fix(接口测试): 解决首页停止定时任务问题
--user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001016708
This commit is contained in:
parent
4324b427eb
commit
4b036fa8c3
|
@ -23,6 +23,7 @@ import io.metersphere.log.utils.ReflexObjectUtil;
|
|||
import io.metersphere.log.vo.DetailColumn;
|
||||
import io.metersphere.log.vo.OperatingLogDetails;
|
||||
import io.metersphere.log.vo.schedule.ScheduleReference;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.JobKey;
|
||||
import org.quartz.SchedulerException;
|
||||
|
@ -91,9 +92,9 @@ public class ScheduleService {
|
|||
return null;
|
||||
}
|
||||
|
||||
public List<Schedule> getScheduleByResourceIds(List<String>resourceIds, String group) {
|
||||
public List<Schedule> getScheduleByResourceIds(List<String> resourceIds, String group) {
|
||||
ScheduleExample example = new ScheduleExample();
|
||||
if(resourceIds.size()==0){
|
||||
if (CollectionUtils.isEmpty(resourceIds)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
example.createCriteria().andResourceIdIn(resourceIds).andGroupEqualTo(group);
|
||||
|
@ -194,7 +195,7 @@ public class ScheduleService {
|
|||
LogUtil.error(e);
|
||||
MSException.throwException("重置定时任务-删除旧定时任务时出现异常");
|
||||
}
|
||||
if(!request.getEnable()){
|
||||
if (!request.getEnable()) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
@ -315,6 +316,12 @@ public class ScheduleService {
|
|||
clazz = TestPlanTestJob.class;
|
||||
request.setJob(TestPlanTestJob.class.getName());
|
||||
needResetJob = true;
|
||||
} else if (ScheduleGroup.SWAGGER_IMPORT.name().equals(request.getGroup())) {
|
||||
jobKey = SwaggerUrlImportJob.getJobKey(request.getResourceId());
|
||||
triggerKey = SwaggerUrlImportJob.getTriggerKey(request.getResourceId());
|
||||
clazz = SwaggerUrlImportJob.class;
|
||||
request.setJob(SwaggerUrlImportJob.class.getName());
|
||||
needResetJob = true;
|
||||
} else {
|
||||
//默认为情景
|
||||
jobKey = ApiScenarioTestJob.getJobKey(request.getResourceId());
|
||||
|
|
|
@ -141,7 +141,6 @@ export default {
|
|||
},
|
||||
|
||||
updateTask(taskRow) {
|
||||
|
||||
this.result = this.$post('/api/schedule/updateEnableByPrimyKey/disable', taskRow, response => {
|
||||
this.search();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue