quartz-mongodb icon indicating copy to clipboard operation
quartz-mongodb copied to clipboard

scheduler.rescheduleJob() when used with quartz-mongodb does not allow jobDap map to be updated

Open nameetpai opened this issue 7 years ago • 1 comments
trafficstars

The implementation in MongoDBJobStore.replaceTrigger() copies over the jobData map from the old trigger, so it doesn't honor new jobData.

There is already a mechanism in place if users of quartz scheduler want to copy over the previous jobData and that's by using oldTrigger.getTriggerBuilder() to clone the previous trigger data and replace only what needs to be updated.

MongoDBJobStore (more specifically TriggerAndJobPersister) should not try to go beyond the documented behavior - https://www.quartz-scheduler.org/api/2.3.0/org/quartz/Scheduler.html#rescheduleJob-org.quartz.TriggerKey-org.quartz.Trigger-)

nameetpai avatar Apr 09 '18 16:04 nameetpai

Feel free to submit a PR that does the right thing, please include a test or two.

michaelklishin avatar May 11 '18 03:05 michaelklishin