mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-12-01 19:49:10 +08:00
fix(接口测试): 场景定时任务环境等配置不生效
--bug=1039061 --user=陈建星 【接口测试】场景-定时任务-创建/更新定时任务-选择新环境执行-执行并未使用新环境 https://www.tapd.cn/55049933/s/1498875
This commit is contained in:
parent
477b7fdae5
commit
830290d516
@ -7,11 +7,8 @@ import io.metersphere.api.dto.debug.ApiResourceRunRequest;
|
||||
import io.metersphere.api.dto.request.MsScenario;
|
||||
import io.metersphere.api.dto.scenario.ApiScenarioDetail;
|
||||
import io.metersphere.api.dto.scenario.ApiScenarioParseParam;
|
||||
import io.metersphere.api.dto.scenario.ScenarioConfig;
|
||||
import io.metersphere.api.service.ApiExecuteService;
|
||||
import io.metersphere.api.service.scenario.ApiScenarioService;
|
||||
import io.metersphere.project.api.processor.MsProcessor;
|
||||
import io.metersphere.project.api.processor.TimeWaitingProcessor;
|
||||
import io.metersphere.sdk.constants.ApiBatchRunMode;
|
||||
import io.metersphere.sdk.constants.ApiExecuteRunMode;
|
||||
import io.metersphere.sdk.constants.TaskTriggerMode;
|
||||
@ -22,23 +19,17 @@ import io.metersphere.sdk.util.JSON;
|
||||
import io.metersphere.sdk.util.LogUtils;
|
||||
import io.metersphere.system.schedule.BaseScheduleJob;
|
||||
import io.metersphere.system.uid.IDGenerator;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobKey;
|
||||
import org.quartz.TriggerKey;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
public class ApiScenarioScheduleJob extends BaseScheduleJob {
|
||||
@Override
|
||||
protected void businessExecute(JobExecutionContext context) {
|
||||
ApiScenarioService apiScenarioService = CommonBeanFactory.getBean(ApiScenarioService.class);
|
||||
ApiExecuteService apiExecuteService = CommonBeanFactory.getBean(ApiExecuteService.class);
|
||||
ApiRunModeConfigDTO apiRunModeConfigDTO = JSON.parseObject(JSON.toJSONString(context.getJobDetail().getJobDataMap()), ApiRunModeConfigDTO.class);
|
||||
ApiRunModeConfigDTO apiRunModeConfigDTO = JSON.parseObject(context.getJobDetail().getJobDataMap().get("config").toString(), ApiRunModeConfigDTO.class);
|
||||
|
||||
ApiScenarioDetail apiScenarioDetail = apiScenarioService.getForRun(resourceId);
|
||||
if (apiScenarioDetail == null) {
|
||||
|
Loading…
Reference in New Issue
Block a user