fix(定时任务配置): 增加Quartz的acquireTriggersWithinLock配置
增加Quartz的acquireTriggersWithinLock配置
This commit is contained in:
parent
4dcdbce306
commit
c8f887019d
|
@ -2,7 +2,6 @@ package io.metersphere.controller;
|
||||||
|
|
||||||
import com.github.pagehelper.Page;
|
import com.github.pagehelper.Page;
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import io.metersphere.api.service.ApiAutomationService;
|
|
||||||
import io.metersphere.base.domain.Schedule;
|
import io.metersphere.base.domain.Schedule;
|
||||||
import io.metersphere.controller.request.QueryScheduleRequest;
|
import io.metersphere.controller.request.QueryScheduleRequest;
|
||||||
import io.metersphere.controller.request.ScheduleRequest;
|
import io.metersphere.controller.request.ScheduleRequest;
|
||||||
|
@ -18,8 +17,6 @@ import java.util.List;
|
||||||
public class ScheduleController {
|
public class ScheduleController {
|
||||||
@Resource
|
@Resource
|
||||||
private ScheduleService scheduleService;
|
private ScheduleService scheduleService;
|
||||||
@Resource
|
|
||||||
private ApiAutomationService apiAutomationService;
|
|
||||||
|
|
||||||
@PostMapping("/list/{goPage}/{pageSize}")
|
@PostMapping("/list/{goPage}/{pageSize}")
|
||||||
public List<ScheduleDao> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryScheduleRequest request) {
|
public List<ScheduleDao> list(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody QueryScheduleRequest request) {
|
||||||
|
|
|
@ -70,6 +70,9 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
|
||||||
@Value("${jmeter.home}")
|
@Value("${jmeter.home}")
|
||||||
private String jmeterHome;
|
private String jmeterHome;
|
||||||
|
|
||||||
|
@Value("${quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock}")
|
||||||
|
private String acquireTriggersWithinLock;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
|
||||||
|
|
||||||
|
@ -94,6 +97,7 @@ public class AppStartListener implements ApplicationListener<ApplicationReadyEve
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LogUtil.info("开始启动定时任务。 定时任务 acquireTriggersWithinLock 设置:"+acquireTriggersWithinLock);
|
||||||
scheduleService.startEnableSchedules();
|
scheduleService.startEnableSchedules();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,6 +93,7 @@ jmeter.home=/opt/jmeter
|
||||||
quartz.enabled=true
|
quartz.enabled=true
|
||||||
quartz.scheduler-name=msServerJob
|
quartz.scheduler-name=msServerJob
|
||||||
quartz.thread-count=30
|
quartz.thread-count=30
|
||||||
|
quartz.properties.org.quartz.jobStore.acquireTriggersWithinLock=true
|
||||||
# file upload
|
# file upload
|
||||||
spring.servlet.multipart.max-file-size=500MB
|
spring.servlet.multipart.max-file-size=500MB
|
||||||
spring.servlet.multipart.max-request-size=500MB
|
spring.servlet.multipart.max-request-size=500MB
|
||||||
|
|
Loading…
Reference in New Issue