Example #1
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;
 }
Example #2
0
 private void initJobs() {
   LOG.info("Initialize flow purge jobs ... ");
   for (ApplicationConfig config : flowManager.findApplicationConfigs()) {
     if (config.isFlowPurgeScheduled()) {
       scheduleJob(config);
     } else {
       LOG.info("Skip scheduling of job for application " + config.getApplication());
     }
   }
   LOG.info("Initialization done. ");
 }