Skip to content

Commit c0ae170

Browse files
committed
take care of RUN_BY_PROCESSOR
1 parent 3a52c28 commit c0ae170

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/common/core/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def ensure_cli_env() -> typing.Generator[None, None, None]:
4141
)
4242
os.environ["PROMETHEUS_MULTIPROC_DIR"] = prometheus_multiproc_dir_name
4343

44+
if "task-processor" in sys.argv:
45+
# A bit hacky way to signal we're not running the API
46+
os.environ["RUN_BY_PROCESSOR"] = "true"
47+
4448
with ctx:
4549
yield
4650

0 commit comments

Comments
 (0)