Skip to content

Commit 412451e

Browse files
committed
Ensure pipeline doesn't wait forever for batch worker on startup
1 parent 8587abc commit 412451e

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

apps/bfd-pipeline-idr/src/idr_pipeline/batch_worker.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -535,10 +535,12 @@ async def start(self, stop: anyio.Event, task_status: TaskStatus | None = None)
535535
)
536536
self._worker.start()
537537

538-
# Block until the worker signals it has started
539-
self._started_signal.wait()
540-
541-
logger.info("LoadingBatchWorker signaled startup")
538+
# Block until the worker signals it has started, or 10 seconds have passed
539+
self._started_signal.wait(10)
540+
if self._started_signal.is_set():
541+
logger.info("LoadingBatchWorker signaled startup")
542+
else:
543+
logger.error("LoadingBatchWorker start signal never set. See exception for detail")
542544

543545
if task_status:
544546
task_status.started()

0 commit comments

Comments
 (0)