Yii2-Queue Order of jobs in Queue after error


(Enrique Molinari) #1

Hi all,
We have a use case that require to copy data from one DB to another, and for this we are using Yii2-queue with the DB driver. It is important that the jobs are written in the destination db in the order in which they where pushed. What we are seeing is that if a particular job fail, the worker continue processing the next jobs in the queue and that will break our use case.

Is there a way to stop the worker after a job fail?


#2

If order of execution of queued jobs matters, it means that they’re not independent jobs. They probably should be moved into single job which will run specific tasks in sequence.