Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fit2-zhao committed Jan 27, 2021
2 parents 42273be + 15f4489 commit d1b3208
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.metersphere.commons.utils.*;
import io.metersphere.i18n.Translator;
import io.metersphere.job.sechedule.ApiScenarioTestJob;
import io.metersphere.job.sechedule.TestPlanTestJob;
import io.metersphere.service.ScheduleService;
import io.metersphere.track.dto.TestPlanDTO;
import io.metersphere.track.request.testcase.ApiCaseRelevanceRequest;
Expand Down Expand Up @@ -630,8 +631,14 @@ public void updateSchedule(Schedule request) {
}

private void addOrUpdateApiScenarioCronJob(Schedule request) {
scheduleService.addOrUpdateCronJob(
request, ApiScenarioTestJob.getJobKey(request.getResourceId()), ApiScenarioTestJob.getTriggerKey(request.getResourceId()), ApiScenarioTestJob.class);
if(StringUtils.equals(request.getGroup(),ScheduleGroup.TEST_PLAN_TEST.name())){
scheduleService.addOrUpdateCronJob(
request, TestPlanTestJob.getJobKey(request.getResourceId()), TestPlanTestJob.getTriggerKey(request.getResourceId()), TestPlanTestJob.class);
}else{
scheduleService.addOrUpdateCronJob(
request, ApiScenarioTestJob.getJobKey(request.getResourceId()), ApiScenarioTestJob.getTriggerKey(request.getResourceId()), ApiScenarioTestJob.class);
}

}

public JmxInfoDTO genPerformanceTestJmx(RunScenarioRequest request) throws Exception {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/io/metersphere/xpack
Submodule xpack updated from 792ace to bb9c03
2 changes: 1 addition & 1 deletion frontend/src/business/components/xpack
Submodule xpack updated from 416645 to 3a3363

0 comments on commit d1b3208

Please sign in to comment.