mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-05 05:29:29 +08:00
refactor(接口定义): 优化场景定时任务逻辑
This commit is contained in:
parent
9d628004c7
commit
bdee2d7776
@ -63,8 +63,6 @@ import org.apache.ibatis.session.SqlSessionFactory;
|
||||
import org.apache.jorphan.collections.HashTree;
|
||||
import org.apache.jorphan.collections.ListedHashTree;
|
||||
import org.mybatis.spring.SqlSessionUtils;
|
||||
import org.quartz.JobKey;
|
||||
import org.quartz.TriggerKey;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -1091,13 +1089,7 @@ public class ApiAutomationService {
|
||||
}
|
||||
|
||||
public void updateSchedule(Schedule request) {
|
||||
scheduleService.editSchedule(request);
|
||||
JobKey jobKey = ApiScenarioTestJob.getJobKey(request.getResourceId());
|
||||
TriggerKey triggerKey = ApiScenarioTestJob.getTriggerKey(request.getResourceId());
|
||||
Class clazz = ApiScenarioTestJob.class;
|
||||
request.setJob(ApiScenarioTestJob.class.getName());
|
||||
this.addOrUpdateApiScenarioCronJob(request);
|
||||
scheduleService.resetJob(request, jobKey, triggerKey, clazz);
|
||||
scheduleService.updateSchedule(request);
|
||||
}
|
||||
|
||||
private void addOrUpdateApiScenarioCronJob(Schedule request) {
|
||||
|
Loading…
Reference in New Issue
Block a user