Maybe Im not doing something right, or there is another way to do this, but I get this LockError raised a lot when Im trying the following;
I have an after_destroy, that does a Delayed::Job.enqueue()
This works fine in the single case, but I also have a dependent destroy arrangment setup - so this hook will be called multiple times in succession.
I expected that to create multiple jobs in the table, each of which get processed one by one until the queue is empty.
Unfortunately only some get processed and other raise this LockError..
Can anyone help me out? ...
BTW, the job workers are kicked off by the master, that I started with script/delayed_job start
I should also point out that on raising this LockError, the job is not ran, and the delayed_jobs table is empty at the end of the process
Good lordy - I'm a fool :S
Realised now that I have multiple delayed_job processes running on the same machine (which I shouldnt)
Well - let this post be a lesson to anyone who find themselves in the same boat!
I have trouble following this ticket. If it's still a valid problem please reopen it and post some steps to reproduce.
No a valid problem, please close it
Thx! had the same and resolved it
I had the same issue: there was a pending dispatch that cannot be locked by any further instance of delayed job. Deleted it from the database, restarted all delayed jobs and everything come back to play properly. I don't know why... but it worked out!