mirror of
https://github.com/PowerJob/PowerJob.git
synced 2025-07-17 00:00:04 +08:00
fix: modify by suggestion
This commit is contained in:
parent
62aeb9c080
commit
e429c6f59e
@ -343,15 +343,13 @@ public class ProcessorTracker {
|
|||||||
if (executeType == ExecuteType.MAP_REDUCE || executeType == ExecuteType.MAP) {
|
if (executeType == ExecuteType.MAP_REDUCE || executeType == ExecuteType.MAP) {
|
||||||
return instanceInfo.getThreadConcurrency();
|
return instanceInfo.getThreadConcurrency();
|
||||||
}
|
}
|
||||||
boolean exeStandalone = executeType == ExecuteType.STANDALONE;
|
|
||||||
boolean fixedJob = TimeExpressionType.frequentTypes.contains(instanceInfo.getTimeExpressionType());
|
|
||||||
if (exeStandalone && fixedJob) {
|
|
||||||
return instanceInfo.getThreadConcurrency();
|
|
||||||
}
|
|
||||||
// 脚本类自带线程池,不过为了少一点逻辑判断,还是象征性分配一个线程
|
// 脚本类自带线程池,不过为了少一点逻辑判断,还是象征性分配一个线程
|
||||||
if (processorType == ProcessorType.PYTHON || processorType == ProcessorType.SHELL) {
|
if (processorType == ProcessorType.PYTHON || processorType == ProcessorType.SHELL) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
if (TimeExpressionType.frequentTypes.contains(instanceInfo.getTimeExpressionType())) {
|
||||||
|
return instanceInfo.getThreadConcurrency();
|
||||||
|
}
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user