Closed lordbuddha closed 10 years ago
Ahh, bug. Need to change
if (existing && replaceExisting) {
jobCollection.update(keyDbo, job);
} else {
jobCollection.insert(job);
}
to
if (existing && replaceExisting) {
jobCollection.update(keyDbo, job);
} else if (!existing) {
jobCollection.insert(job);
}
Actually, needs more work than that. Will fix.
Trying to schedule a job with a second trigger causes (line numbers not reflective of master branch).
org.quartz.ObjectAlreadyExistsException: {....} at com.novemberain.quartz.mongodb.MongoDBJobStore.storeJobInMongo(MongoDBJobStore.java:1093) at com.novemberain.quartz.mongodb.MongoDBJobStore.storeJobAndTrigger(MongoDBJobStore.java:118) at org.quartz.core.QuartzScheduler.scheduleJob(QuartzScheduler.java:840) at org.quartz.impl.StdScheduler.scheduleJob(StdScheduler.java:250)
If the Job already exists, cool, ignore the error and just add the trigger.... There is supposed to be support for a one (job) to many (triggers) relationship here.
Was trying to add the second trigger to test out my DisallowConcurrentExecution support.