Exemple #1
0
 private void scheduleJob(ApplicationConfig config) {
   FlowPurgeJob flowPurgeJob = getFlowPurgeJob(config);
   if (flowPurgeJob.isScheduled()) {
     flowPurgeJob.unschedule();
   }
   flowPurgeJob.schedule(config);
 }
Exemple #2
0
 private FlowPurgeJob getFlowPurgeJob(ApplicationConfig config) {
   FlowPurgeJob flowPurgeJob = flowPurgeJobs.get(config.getApplication());
   if (flowPurgeJob == null) {
     flowPurgeJob = new FlowPurgeJob(flowManager, scheduler, application);
     flowPurgeJob.setFlowPurgeSchedule(config.getFlowPurgeSchedule());
     flowPurgeJob.setPurgeFlowsOlderThan(config.getPurgeFlowsOlderThan());
     flowPurgeJob.setDoNotPurgeErrorFlows(config.isDoNotPurgeErrorFlows());
     flowPurgeJobs.put(application, flowPurgeJob);
   }
   return flowPurgeJob;
 }
Exemple #3
0
 private void executeJob(ApplicationConfig config) {
   FlowPurgeJob flowPurgeJob = getFlowPurgeJob(config);
   flowPurgeJob.execute(config);
 }