vendredi 19 avril 2019

Laravel database transactions across chained queues (Horizon/Redis)

I have searched for hours on this and am thinking its maybe simply not possible? Is If a job in my queue chain fails, can I rollback all database transactions that have occurred to this point.

DB::transaction(function () {
   ProcessPodcast::withChain([
       new OptimizePodcast,
       new ReleasePodcast
   ])->dispatch();
});

note: I know the above will not work when asynchronously pushing jobs to the queue, but is there a way to get this effect?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire