mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix frequent job bug
This commit is contained in:
parent
6433ed23b1
commit
2a3640c88c
@ -99,6 +99,8 @@ public class DispatchService {
|
||||
// 构造请求
|
||||
ServerScheduleJobReq req = new ServerScheduleJobReq();
|
||||
BeanUtils.copyProperties(jobInfo, req);
|
||||
// 传入 JobId
|
||||
req.setJobId(jobInfo.getId());
|
||||
req.setInstanceParams(instanceParams);
|
||||
req.setInstanceId(instanceId);
|
||||
req.setAllWorkerAddress(finalWorkers);
|
||||
|
@ -164,7 +164,7 @@ public class FrequentTaskTracker extends TaskTracker {
|
||||
// 判断是否超出最大执行实例数
|
||||
if (timeExpressionType == TimeExpressionType.FIX_RATE) {
|
||||
if (subInstanceId2TimeHolder.size() > maxInstanceNum) {
|
||||
log.error("[TaskTracker-{}] cancel to launch the subInstance({}) due to too much subInstance is running.", instanceId, subInstanceId);
|
||||
log.warn("[TaskTracker-{}] cancel to launch the subInstance({}) due to too much subInstance is running.", instanceId, subInstanceId);
|
||||
processFinishedSubInstance(subInstanceId, false, "TOO_MUCH_INSTANCE");
|
||||
return;
|
||||
}
|
||||
@ -320,6 +320,9 @@ public class FrequentTaskTracker extends TaskTracker {
|
||||
failedTimes.incrementAndGet();
|
||||
}
|
||||
|
||||
// 从运行中任务列表移除
|
||||
subInstanceId2TimeHolder.remove(subInstanceId);
|
||||
|
||||
// 更新缓存数据
|
||||
if (recentSubInstanceInfo.containsKey(subInstanceId)) {
|
||||
SubInstanceInfo subInstanceInfo = recentSubInstanceInfo.get(subInstanceId);
|
||||
|
Loading…
x
Reference in New Issue
Block a user