|
@@ -15,6 +15,7 @@ import org.springframework.stereotype.Component;
|
|
|
import cn.com.qmth.examcloud.commons.exception.ExamCloudRuntimeException;
|
|
|
import cn.com.qmth.examcloud.task.dao.ScheduleJobRepo;
|
|
|
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.task.QuartzManager;
|
|
|
import cn.com.qmth.examcloud.web.task.ScheduleJob;
|
|
@@ -38,6 +39,10 @@ public class JobsStartup implements ApplicationRunner {
|
|
|
|
|
|
@Autowired
|
|
|
private DiscoveryClient discoveryClient;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ReportsComputeService reportsComputeService;
|
|
|
+
|
|
|
|
|
|
public void start() {
|
|
|
|
|
@@ -54,7 +59,9 @@ public class JobsStartup implements ApplicationRunner {
|
|
|
throw new ExamCloudRuntimeException("multiple task instances!");
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ //初始化任务数据
|
|
|
+ initJobData();
|
|
|
+
|
|
|
new Thread(new Runnable() {
|
|
|
|
|
|
@Override
|
|
@@ -99,5 +106,9 @@ public class JobsStartup implements ApplicationRunner {
|
|
|
public void run(ApplicationArguments args) throws Exception {
|
|
|
start();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ private void initJobData() {
|
|
|
+ //成绩统计报表计算任务数据状态重置
|
|
|
+ reportsComputeService.initReportsCompute();
|
|
|
+ }
|
|
|
}
|