Java Code Examples for com.xxl.job.core.executor.XxlJobExecutor#setLogRetentionDays()
The following examples show how to use
com.xxl.job.core.executor.XxlJobExecutor#setLogRetentionDays() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JbootConfig.java From xxl-job with GNU General Public License v3.0 | 6 votes |
private void initXxlJobExecutor() { // registry jobhandler XxlJobExecutor.registJobHandler("demoJobHandler", new DemoJobHandler()); XxlJobExecutor.registJobHandler("shardingJobHandler", new ShardingJobHandler()); XxlJobExecutor.registJobHandler("httpJobHandler", new HttpJobHandler()); XxlJobExecutor.registJobHandler("commandJobHandler", new CommandJobHandler()); // init executor xxlJobExecutor = new XxlJobExecutor(); xxlJobExecutor.setAdminAddresses(Jboot.configValue("xxl.job.admin.addresses")); xxlJobExecutor.setAccessToken(Jboot.configValue("xxl.job.accessToken")); xxlJobExecutor.setAddress(Jboot.configValue("xxl.job.executor.address")); xxlJobExecutor.setAppname(Jboot.configValue("xxl.job.executor.appname")); xxlJobExecutor.setIp(Jboot.configValue("xxl.job.executor.ip")); xxlJobExecutor.setPort(Integer.valueOf(Jboot.configValue("xxl.job.executor.port"))); xxlJobExecutor.setLogPath(Jboot.configValue("xxl.job.executor.logpath")); xxlJobExecutor.setLogRetentionDays(Integer.valueOf(Jboot.configValue("xxl.job.executor.logretentiondays"))); // start executor try { xxlJobExecutor.start(); } catch (Exception e) { logger.error(e.getMessage(), e); } }
Example 2
Source File: FrameLessXxlJobConfig.java From xxl-job with GNU General Public License v3.0 | 5 votes |
/** * init */ public void initXxlJobExecutor() { // registry jobhandler XxlJobExecutor.registJobHandler("demoJobHandler", new DemoJobHandler()); XxlJobExecutor.registJobHandler("shardingJobHandler", new ShardingJobHandler()); XxlJobExecutor.registJobHandler("httpJobHandler", new HttpJobHandler()); XxlJobExecutor.registJobHandler("commandJobHandler", new CommandJobHandler()); // load executor prop Properties xxlJobProp = loadProperties("xxl-job-executor.properties"); // init executor xxlJobExecutor = new XxlJobExecutor(); xxlJobExecutor.setAdminAddresses(xxlJobProp.getProperty("xxl.job.admin.addresses")); xxlJobExecutor.setAccessToken(xxlJobProp.getProperty("xxl.job.accessToken")); xxlJobExecutor.setAppname(xxlJobProp.getProperty("xxl.job.executor.appname")); xxlJobExecutor.setAddress(xxlJobProp.getProperty("xxl.job.executor.address")); xxlJobExecutor.setIp(xxlJobProp.getProperty("xxl.job.executor.ip")); xxlJobExecutor.setPort(Integer.valueOf(xxlJobProp.getProperty("xxl.job.executor.port"))); xxlJobExecutor.setLogPath(xxlJobProp.getProperty("xxl.job.executor.logpath")); xxlJobExecutor.setLogRetentionDays(Integer.valueOf(xxlJobProp.getProperty("xxl.job.executor.logretentiondays"))); // start executor try { xxlJobExecutor.start(); } catch (Exception e) { logger.error(e.getMessage(), e); } }
Example 3
Source File: NutzSetup.java From xxl-job with GNU General Public License v3.0 | 5 votes |
@Override public void init(NutConfig cfg) { // registry jobhandler XxlJobExecutor.registJobHandler("demoJobHandler", new DemoJobHandler()); XxlJobExecutor.registJobHandler("shardingJobHandler", new ShardingJobHandler()); XxlJobExecutor.registJobHandler("httpJobHandler", new HttpJobHandler()); XxlJobExecutor.registJobHandler("commandJobHandler", new CommandJobHandler()); // load executor prop PropertiesProxy xxlJobProp = new PropertiesProxy("xxl-job-executor.properties"); // init executor xxlJobExecutor = new XxlJobExecutor(); xxlJobExecutor.setAdminAddresses(xxlJobProp.get("xxl.job.admin.addresses")); xxlJobExecutor.setAccessToken(xxlJobProp.get("xxl.job.accessToken")); xxlJobExecutor.setAppname(xxlJobProp.get("xxl.job.executor.appname")); xxlJobExecutor.setAddress(xxlJobProp.get("xxl.job.executor.address")); xxlJobExecutor.setIp(xxlJobProp.get("xxl.job.executor.ip")); xxlJobExecutor.setPort(xxlJobProp.getInt("xxl.job.executor.port")); xxlJobExecutor.setLogPath(xxlJobProp.get("xxl.job.executor.logpath")); xxlJobExecutor.setLogRetentionDays(xxlJobProp.getInt("xxl.job.executor.logretentiondays")); // start executor try { xxlJobExecutor.start(); } catch (Exception e) { logger.error(e.getMessage(), e); } }
Example 4
Source File: JFinalCoreConfig.java From xxl-job with GNU General Public License v3.0 | 5 votes |
private void initXxlJobExecutor() { // registry jobhandler XxlJobExecutor.registJobHandler("demoJobHandler", new DemoJobHandler()); XxlJobExecutor.registJobHandler("shardingJobHandler", new ShardingJobHandler()); XxlJobExecutor.registJobHandler("httpJobHandler", new HttpJobHandler()); XxlJobExecutor.registJobHandler("commandJobHandler", new CommandJobHandler()); // load executor prop Prop xxlJobProp = PropKit.use("xxl-job-executor.properties"); // init executor xxlJobExecutor = new XxlJobExecutor(); xxlJobExecutor.setAdminAddresses(xxlJobProp.get("xxl.job.admin.addresses")); xxlJobExecutor.setAccessToken(xxlJobProp.get("xxl.job.accessToken")); xxlJobExecutor.setAddress(xxlJobProp.get("xxl.job.executor.address")); xxlJobExecutor.setAppname(xxlJobProp.get("xxl.job.executor.appname")); xxlJobExecutor.setIp(xxlJobProp.get("xxl.job.executor.ip")); xxlJobExecutor.setPort(xxlJobProp.getInt("xxl.job.executor.port")); xxlJobExecutor.setLogPath(xxlJobProp.get("xxl.job.executor.logpath")); xxlJobExecutor.setLogRetentionDays(xxlJobProp.getInt("xxl.job.executor.logretentiondays")); // start executor try { xxlJobExecutor.start(); } catch (Exception e) { logger.error(e.getMessage(), e); } }