Skip to content

Commit

Permalink
bgjobs: fix success check to account for parallelism
Browse files Browse the repository at this point in the history
  • Loading branch information
ikreymer committed Feb 20, 2025
1 parent f0ba699 commit b3363e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/btrixcloud/operator/bgjobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ async def finalize_background_job(self, data: MCDecoratorSyncData) -> dict:
job_id: str = labels.get("job_id") or metadata.get("name")

status = data.object["status"]
success = status.get("succeeded") == 1
spec = data.object["spec"]
success = status.get("succeeded") >= spec.get("parallelism")
completion_time = status.get("completionTime")

finalized = True
Expand Down

0 comments on commit b3363e2

Please sign in to comment.