Hi I also ran into this and got it working kind of.
Im using Laravel 5.3 and in your job class i have the following code
public function handle( Mailer $mailer )
{
try {
if (ToolsService::serverLoadHigh()) {
$this->release(600);
} else {
.....
}
} catch() {
}
}
Within the trait InteractsWithQueue it has a release() function which schedules the job (in this case) in 10 minutes The value is in seconds.
Only thing if seen is that is still increments the number of attempts. Not sure about reusing the id, I think you can add something to actually reset auto increment value on each run.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community