symbiote / silverstripe-queuedjobs

A module that provides interfaces for scheduling jobs for certain times.
BSD 3-Clause "New" or "Revised" License
57 stars 73 forks source link

CleanupJobs dont always get `reenqueue()`'d #363

Closed micschk closed 2 years ago

micschk commented 2 years ago

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();
}
micschk commented 2 years ago

Excuse me -- correct solution but of a totally different (custom) job...