Please sign in to comment.
Fix a race condition encountered with pruning dead workers
On a single machine, starting multiple workers at the same time would cause the same job to have it's failure hook called multiple times. In this patch I'm only calling job.Fail when we've successfully removed the worker from the :workers set. Effectively this synchronizes the job fail on the first worker to successfully remove itself from the set.
- Loading branch information...
Showing with 17 additions and 10 deletions.