Skip to content

Commit

Permalink
wait for jobs to finish before starting post-collect
Browse files Browse the repository at this point in the history
  • Loading branch information
meln1k committed Jul 31, 2024
1 parent ed4cb66 commit f424205
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fixbackend/dispatcher/dispatcher_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,10 @@ async def handle_success() -> None:

tenant_collect_state = await self.collect_progress.get_tenant_collect_state(workspace_id)

if not all(job.is_done() for job in tenant_collect_state.values()):
log.info("One of multiple jobs finished. Waiting for the remaining jobs.")
return

if all([isinstance(progress.collection_done, CollectionFailure) for progress in tenant_collect_state.values()]):
log.info("Allcollect jobs failed, completing collect run")
await self.complete_collect_job(workspace_id)
Expand Down

0 comments on commit f424205

Please sign in to comment.