laravel-async-queue
laravel-async-queue copied to clipboard
How can i run async only once?
I used async queue. And, I want to run my background function only once. How can i do that ? Here is my code. Is it right or wrong ? What should i fix ? And how can i know which job failed ?
$job = new myjob($var1, $var2); $this->dispatch($job); $job->release(); if ($job->attempts() >= 1) { $job->delete(); //will do other process when job fail }