Laravel database transactions across chained queues (Horizon/Redis)

Posted 3 months ago by lambooni

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?

Please sign in or create an account to participate in this conversation.