Skip to content

Commit ca396df

Browse files
authored
fix: PROMETHEUS_MULTIPROC_DIR deleted prematurely (#38)
1 parent 9bcae1d commit ca396df

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/common/core/main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,7 @@ def ensure_cli_env() -> typing.Generator[None, None, None]:
4040

4141
# Set up Prometheus' multiprocess mode
4242
if "PROMETHEUS_MULTIPROC_DIR" not in os.environ:
43-
prometheus_multiproc_dir_name = ctx.enter_context(
44-
tempfile.TemporaryDirectory(
45-
prefix="prometheus_multiproc",
46-
)
47-
)
43+
prometheus_multiproc_dir_name = tempfile.mkdtemp()
4844

4945
logger.info(
5046
"Created %s for Prometheus multi-process mode",

0 commit comments

Comments
 (0)