We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9eb19d4 commit 1a85292Copy full SHA for 1a85292
1 file changed
backend/workers/broker.py
@@ -33,7 +33,10 @@
33
@broker.on_event(TaskiqEvents.WORKER_STARTUP)
34
async def start_metrics_server(_state: Any) -> None:
35
if settings.START_METRICS:
36
- start_http_server(settings.METRICS_PORT)
+ try:
37
+ start_http_server(settings.METRICS_PORT)
38
+ except OSError:
39
+ pass # Port already bound (e.g. container restart with --workers > 1)
40
41
42
# Initialise the scheduler with label and Redis sources
0 commit comments