glucaci / mongodb-quartz-net

MongoDB Job Store for Quartz.NET
MIT License
51 stars 41 forks source link

Misfired jobs management #11

Closed hvincente closed 6 years ago

hvincente commented 6 years ago

Hi, i don't know if this project is still alive. I have made some tests and i have a problem with misfired jobs. During startup, misfired jobs are deleted instead of being put in waiting state. I think there is a mistake in MongoDbStore.DoUpdateOfMisfiredTrigger method. This condition must be inverted if (operableTrigger.GetNextFireTimeUtc().HasValue), if not trigger has a NextFireTime but will be set as Completed and cleaned up during the startup process. I've watcher ado.net store implementation here https://github.com/quartznet/quartznet/blob/b33e6f8630a8dddfb0c1b6117237d538a5931dc9/src/Quartz/Impl/AdoJobStore/JobStoreSupport.cs and the condition is if (!trig.GetNextFireTimeUtc().HasValue).

Thanks in advance

chrisdrobison commented 6 years ago

Yeah, this project is still alive, but since the job store never changes, neither does this. I'll take a look.