|
@@ -15,13 +15,12 @@ import org.springframework.stereotype.Component;
|
|
import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
|
|
import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
|
|
import cn.com.qmth.examcloud.task.dao.ScheduleJobRepo;
|
|
import cn.com.qmth.examcloud.task.dao.ScheduleJobRepo;
|
|
import cn.com.qmth.examcloud.task.dao.entity.ScheduleJobEntity;
|
|
import cn.com.qmth.examcloud.task.dao.entity.ScheduleJobEntity;
|
|
-import cn.com.qmth.examcloud.task.service.ReportsComputeService;
|
|
|
|
import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
import cn.com.qmth.examcloud.web.bootstrap.PropertyHolder;
|
|
import cn.com.qmth.examcloud.web.task.QuartzManager;
|
|
import cn.com.qmth.examcloud.web.task.QuartzManager;
|
|
import cn.com.qmth.examcloud.web.task.ScheduleJob;
|
|
import cn.com.qmth.examcloud.web.task.ScheduleJob;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 类注释
|
|
|
|
|
|
+ * 定时任务启动
|
|
*
|
|
*
|
|
* @author WANGWEI
|
|
* @author WANGWEI
|
|
* @date 2018年11月29日
|
|
* @date 2018年11月29日
|
|
@@ -39,10 +38,6 @@ public class JobsStartup implements ApplicationRunner {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private DiscoveryClient discoveryClient;
|
|
private DiscoveryClient discoveryClient;
|
|
-
|
|
|
|
- @Autowired
|
|
|
|
- private ReportsComputeService reportsComputeService;
|
|
|
|
-
|
|
|
|
|
|
|
|
public void start() {
|
|
public void start() {
|
|
|
|
|
|
@@ -59,9 +54,7 @@ public class JobsStartup implements ApplicationRunner {
|
|
throw new ExamCloudRuntimeException("multiple task instances!");
|
|
throw new ExamCloudRuntimeException("multiple task instances!");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- //初始化任务数据
|
|
|
|
- initJobData();
|
|
|
|
-
|
|
|
|
|
|
+
|
|
new Thread(new Runnable() {
|
|
new Thread(new Runnable() {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -106,9 +99,5 @@ public class JobsStartup implements ApplicationRunner {
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
start();
|
|
start();
|
|
}
|
|
}
|
|
-
|
|
|
|
- private void initJobData() {
|
|
|
|
- //成绩统计报表计算任务数据状态重置
|
|
|
|
- reportsComputeService.initReportsCompute();
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
}
|
|
}
|