disable gap time for now

This commit is contained in:
Ken Stevens 2019-11-28 17:57:52 -05:00
parent a58da3b535
commit f450cea9a5
1 changed files with 7 additions and 2 deletions

View File

@ -41,23 +41,28 @@ public abstract class FireAtIntervalJob implements Job {
@Override @Override
public final void execute(JobExecutionContext theContext) { public final void execute(JobExecutionContext theContext) {
/** FIXME KHS
Long nextExecution = (Long) theContext.getJobDetail().getJobDataMap().get(NEXT_EXECUTION_TIME); Long nextExecution = (Long) theContext.getJobDetail().getJobDataMap().get(NEXT_EXECUTION_TIME);
if (nextExecution != null) { if (nextExecution != null) {
long cutoff = System.currentTimeMillis(); long cutoff = System.currentTimeMillis();
if (nextExecution >= cutoff) { if (nextExecution >= cutoff) {
ourLog.info("Not enough time has passed since last execution of {}. Skipping this one.", theContext.getJobDetail().getDescription());
return; return;
} }
} }
*/
try { try {
doExecute(theContext); doExecute(theContext);
} catch (Throwable t) { } catch (Throwable t) {
ourLog.error("Job threw uncaught exception", t); ourLog.error("Job threw uncaught exception", t);
} finally { }
/** FIXME KHS
finally {
long newNextExecution = System.currentTimeMillis() + myMillisBetweenExecutions; long newNextExecution = System.currentTimeMillis() + myMillisBetweenExecutions;
theContext.getJobDetail().getJobDataMap().put(NEXT_EXECUTION_TIME, newNextExecution); theContext.getJobDetail().getJobDataMap().put(NEXT_EXECUTION_TIME, newNextExecution);
} }
*/
} }
protected abstract void doExecute(JobExecutionContext theContext); protected abstract void doExecute(JobExecutionContext theContext);