Skip to content

Commit cbf55cb

Browse files
fix: simplify multiworker NATS configuration handling
1 parent da80f12 commit cbf55cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

main.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,8 @@
2828
if workers < 1:
2929
logger.warning(f"Invalid UVICORN_WORKERS value '{UVICORN_WORKERS}', defaulting to 1.")
3030
workers = 1
31-
try:
31+
elif workers > 1:
3232
require_nats_if_multiworker(workers)
33-
except RuntimeError as e:
34-
logger.info("multiworker NATS is not properly configured, defaulting to single worker.")
35-
logger.debug(str(e))
36-
workers = 1
3733

3834

3935
app = create_app(role="panel")

0 commit comments

Comments
 (0)