mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: grammar errors
This commit is contained in:
commit
24a1f2dee9
@ -11,7 +11,7 @@ public class SystemInstanceResult {
|
|||||||
/* *********** 普通instance 专用 *********** */
|
/* *********** 普通instance 专用 *********** */
|
||||||
|
|
||||||
// 同时运行的任务实例数过多
|
// 同时运行的任务实例数过多
|
||||||
public static final String TOO_MUCH_INSTANCE = "too much instance(%d>%d)";
|
public static final String TOO_MANY_INSTANCES = "too many instances(%d>%d)";
|
||||||
// 无可用worker
|
// 无可用worker
|
||||||
public static final String NO_WORKER_AVAILABLE = "no worker available";
|
public static final String NO_WORKER_AVAILABLE = "no worker available";
|
||||||
// 任务执行超时
|
// 任务执行超时
|
||||||
|
@ -84,7 +84,7 @@ public class DispatchService {
|
|||||||
long runningInstanceCount = instanceInfoRepository.countByJobIdAndStatusIn(jobId, Lists.newArrayList(WAITING_WORKER_RECEIVE.getV(), RUNNING.getV()));
|
long runningInstanceCount = instanceInfoRepository.countByJobIdAndStatusIn(jobId, Lists.newArrayList(WAITING_WORKER_RECEIVE.getV(), RUNNING.getV()));
|
||||||
// 超出最大同时运行限制,不执行调度
|
// 超出最大同时运行限制,不执行调度
|
||||||
if (runningInstanceCount > maxInstanceNum) {
|
if (runningInstanceCount > maxInstanceNum) {
|
||||||
String result = String.format(SystemInstanceResult.TOO_MUCH_INSTANCE, runningInstanceCount, maxInstanceNum);
|
String result = String.format(SystemInstanceResult.TOO_MANY_INSTANCES, runningInstanceCount, maxInstanceNum);
|
||||||
log.warn("[Dispatcher-{}|{}] cancel dispatch job due to too much instance is running ({} > {}).", jobId, instanceId, runningInstanceCount, maxInstanceNum);
|
log.warn("[Dispatcher-{}|{}] cancel dispatch job due to too much instance is running ({} > {}).", jobId, instanceId, runningInstanceCount, maxInstanceNum);
|
||||||
instanceInfoRepository.update4TriggerFailed(instanceId, FAILED.getV(), currentRunningTimes, current, current, RemoteConstant.EMPTY_ADDRESS, result, dbInstanceParams, now);
|
instanceInfoRepository.update4TriggerFailed(instanceId, FAILED.getV(), currentRunningTimes, current, current, RemoteConstant.EMPTY_ADDRESS, result, dbInstanceParams, now);
|
||||||
|
|
||||||
|
@ -131,7 +131,7 @@ public class WorkflowInstanceManager {
|
|||||||
// 并发度控制
|
// 并发度控制
|
||||||
int instanceConcurrency = workflowInstanceInfoRepository.countByWorkflowIdAndStatusIn(wfInfo.getId(), WorkflowInstanceStatus.generalizedRunningStatus);
|
int instanceConcurrency = workflowInstanceInfoRepository.countByWorkflowIdAndStatusIn(wfInfo.getId(), WorkflowInstanceStatus.generalizedRunningStatus);
|
||||||
if (instanceConcurrency > wfInfo.getMaxWfInstanceNum()) {
|
if (instanceConcurrency > wfInfo.getMaxWfInstanceNum()) {
|
||||||
onWorkflowInstanceFailed(String.format(SystemInstanceResult.TOO_MUCH_INSTANCE, instanceConcurrency, wfInfo.getMaxWfInstanceNum()), wfInstanceInfo);
|
onWorkflowInstanceFailed(String.format(SystemInstanceResult.TOO_MANY_INSTANCES, instanceConcurrency, wfInfo.getMaxWfInstanceNum()), wfInstanceInfo);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user