I think if there's no jobs to cleanup, the signature of the new job to create may be identical to the (current) job creating it(?).
This results in the new CleanupJob not actually being added to the queue.
Maybe the job signature could be made random to prevent this issue?
public function getSignature()
{
// Allow adding multiple 'identical' CleanupJobs to the queue:
return parent::randomSignature();
}
I think if there's no jobs to cleanup, the signature of the new job to create may be identical to the (current) job creating it(?). This results in the new CleanupJob not actually being added to the queue.
Maybe the job signature could be made random to prevent this issue?