diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/job/ApiScenarioScheduleJob.java b/backend/services/api-test/src/main/java/io/metersphere/api/job/ApiScenarioScheduleJob.java index f792648fcc..90533a31e6 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/job/ApiScenarioScheduleJob.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/job/ApiScenarioScheduleJob.java @@ -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) {