4 changed files with 53 additions and 4 deletions
@ -0,0 +1,16 @@ |
|||||||
|
package org.leolo.nrdatad; |
||||||
|
|
||||||
|
public final class Constants { |
||||||
|
public static class Metadata{ |
||||||
|
public static final String LAST_LTP = "01-last-ltp-time"; |
||||||
|
} |
||||||
|
|
||||||
|
public static class CronJob{ |
||||||
|
public static final String REFERENCE_DATA = "refd"; |
||||||
|
} |
||||||
|
|
||||||
|
public static class Configuration { |
||||||
|
public static final String ALWAYS_RUN_LTP = "cron.ltp.always"; |
||||||
|
public static final String ALWAYS_RUN_REF_DATA = "cron.ref.always"; |
||||||
|
} |
||||||
|
} |
||||||
@ -0,0 +1,17 @@ |
|||||||
|
package org.leolo.nrdatad.org.leolo.nrdatad.cron; |
||||||
|
|
||||||
|
import org.apache.logging.log4j.LogManager; |
||||||
|
import org.apache.logging.log4j.Logger; |
||||||
|
import org.quartz.Job; |
||||||
|
import org.quartz.JobExecutionContext; |
||||||
|
import org.quartz.JobExecutionException; |
||||||
|
|
||||||
|
public class ReferenceDataJob implements Job { |
||||||
|
|
||||||
|
Logger log = LogManager.getLogger(); |
||||||
|
|
||||||
|
@Override |
||||||
|
public void execute(JobExecutionContext context) throws JobExecutionException { |
||||||
|
log.atInfo().log("Load reference data triggered at {}", context.getFireTime()); |
||||||
|
} |
||||||
|
} |
||||||
Loading…
Reference in new issue