Skip to content

Make sure pending jobs assigned to a worker get rescheduled

Description

We ran into an issue where occasionally jobs would be in the queue but not picked up by any workers, even though they were idle. After some digging, it turns out that in certain cases retrying a job doesn't put it back on the queue using the in-memory data store. Specifically, if the job has been assigned to a worker, but the worker doesn't move the lease into status ACTIVE before the job gets retired, the job doesn't get re-added to the queue. This MR corrects this and adds a test for this specific case, along with cleaning up test_scheduler.py

Edited by Jeremiah Bonney

Merge request reports