fix: Unstable PROMETHEUS_MULTIPROC_DIR#116
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #116 +/- ##
==========================================
- Coverage 94.67% 94.63% -0.05%
==========================================
Files 76 77 +1
Lines 2479 2459 -20
==========================================
- Hits 2347 2327 -20
Misses 132 132 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
emyller
left a comment
There was a problem hiding this comment.
I don't have context yet, but I'm interested in possibly cleaning up temporary files on startup (just in case the previous run ended unexpectedly), and on shutdown (because it's polite to cleanup resources after use).
Unless there's reason I don't know, the better approach to manage temporary files should be via tempfile as long as we always cleanup.
I agree, but see below.
|
In this PR, we change the following:
PROMETHEUS_MULTIPROC_DIRinstead of relying on a random one offered bytempfile.mkdtempto completely avoid new directories spam reported in temporary directories are not removed flagsmith#5990.