use of com.vip.saturn.job.console.domain.RestApiJobStatistics in project Saturn by vipshop.
the class RestApiServiceImpl method constructJobInfo.
private RestApiJobInfo constructJobInfo(CuratorRepository.CuratorFrameworkOp curatorFrameworkOp, String job) {
RestApiJobInfo restApiJobInfo = new RestApiJobInfo();
restApiJobInfo.setJobName(job);
// 设置作业配置信息
setJobConfig(curatorFrameworkOp, restApiJobInfo, job);
// 设置运行状态
setRunningStatus(curatorFrameworkOp, restApiJobInfo, job);
// 设置统计信息
RestApiJobStatistics restApiJobStatistics = new RestApiJobStatistics();
setStatics(curatorFrameworkOp, restApiJobStatistics, job);
restApiJobInfo.setStatistics(restApiJobStatistics);
return restApiJobInfo;
}
use of com.vip.saturn.job.console.domain.RestApiJobStatistics in project Saturn by vipshop.
the class JobOperationRestApiControllerTest method constructJobInfo.
private RestApiJobInfo constructJobInfo(String domain, String jobName) {
RestApiJobInfo jobInfo = new RestApiJobInfo();
jobInfo.setJobName(jobName);
jobInfo.setEnabled(true);
jobInfo.setDescription("this is a decription of " + jobName);
RestApiJobConfig jobConfig = new RestApiJobConfig();
jobConfig.setCron("0 */1 * * * ?");
jobInfo.setJobConfig(jobConfig);
RestApiJobStatistics statistics = new RestApiJobStatistics();
statistics.setNextFireTime(1234567L);
jobInfo.setStatistics(statistics);
return jobInfo;
}
Aggregations