Browse Source

Merge pull request #232 in CORE/base-third from ~LANLAN/base-third:release/10.0 to release/10.0

* commit '978eccd5be67e6579db47fddeddba7f94094cf02':
  DEC-8173 脏数据导致quartz启动失败
bugfix/10.0
ju 6 years ago
parent
commit
aa96c0380e
  1. 21
      fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

21
fine-quartz/src/com/fr/third/v2/org/quartz/impl/jdbcjobstore/JobStoreSupport.java

@ -982,18 +982,21 @@ public abstract class JobStoreSupport implements JobStore, Constants {
} }
for (TriggerKey triggerKey : misfiredTriggers) { for (TriggerKey triggerKey : misfiredTriggers) {
try {
OperableTrigger trig =
retrieveTrigger(conn, triggerKey);
OperableTrigger trig = if (trig == null) {
retrieveTrigger(conn, triggerKey); continue;
}
if (trig == null) {
continue;
}
doUpdateOfMisfiredTrigger(conn, trig, false, STATE_WAITING, recovering); doUpdateOfMisfiredTrigger(conn, trig, false, STATE_WAITING, recovering);
if (trig.getNextFireTime() != null && trig.getNextFireTime().getTime() < earliestNewTime) if (trig.getNextFireTime() != null && trig.getNextFireTime().getTime() < earliestNewTime)
earliestNewTime = trig.getNextFireTime().getTime(); earliestNewTime = trig.getNextFireTime().getTime();
} catch (JobPersistenceException e) {
getLog().error(e.getMessage());
}
} }
return new RecoverMisfiredJobsResult( return new RecoverMisfiredJobsResult(

Loading…
Cancel
Save