I'm starting some php workers at the same time and each of them takes a job to do. These jobs are written in database table and when worker takes one - it deletes the record. My code:
$job = Job::first();
if (!empty($job) and $job->delete()==true) {
// so something
}
But the problem is that still some workers take the same $job to perform at the same time! How this can happen?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2H85Bj0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire