A bug was noticed in the curation framework where queues could not be properly processed if a previous job had failed and the files were left in a bad state.
More specifically, the implementation expects to find files named "queue0", "queue1", "queue2", "queue3" etc. These are iterated over with an incrementing integer until one of the files is not found (or is locked). However, a previous error could leave "queue3" around, preventing it from ever being processed during subsequent runs (unless queue 0, 1, & 2 exist again).
The solution to this is to list the queues in the directory and process each according to their index, so none are ever skipped.