Closed lordbuddha closed 10 years ago
@lordbuddha please submit pull requests instead of posting code snippets.
Hi, I would but am rushed off feet at the moment ...
Will see what I can do.
On 9 November 2013 12:57, Michael Klishin notifications@github.com wrote:
@lordbuddha https://github.com/lordbuddha please submit pull requests instead of posting code snippets.
— Reply to this email directly or view it on GitHubhttps://github.com/michaelklishin/quartz-mongodb/issues/44#issuecomment-28108106 .
Should be fixed in a3917a5651aa419b8fc717b07419eb62c14ff5ba.
If you have a job with a single trigger, and during the execution of that job you make a call to reschedule that job, the code fails because replaceTrigger calls removeTrigger which also deletes the associated job if that was the only trigger associated with the job and it was not durable.
So, in replaceTrigger,
replace
With
It might be worth considering adding an appropriate lock around the remove of the old trigger and the adding of the new.