framework icon indicating copy to clipboard operation
framework copied to clipboard

[Proposal] Queue Exception delay

Open marcvdm opened this issue 13 years ago • 1 comments

Right now when a job fails due to an exception being thrown the job is immediately released back to the queue.

Maybe if we could set a config option exception_delay with the default amount of delay after an exception is thrown we could reduce the load if a job is released every time it fails.

Right now it does this:

Worker.php

if ( ! $job->isDeleted()) $job->release($delay);

Maybe change it to something like this:

if($delay === 0)
{
    $delay = $this->manager->getExceptionDelay();
}

if ( ! $job->isDeleted()) $job->release($delay);

So when a job already has a delay we don't override it but when delay is 0 we override it with the config option.

marcvdm avatar Nov 20 '13 22:11 marcvdm

There are some upcoming changes for a "failed jobs" database table integrated into Laravel that should really solve this problem.

taylorotwell avatar Nov 20 '13 22:11 taylorotwell