use of com.netsteadfast.greenstep.support.ExpressionJobExecuteCallable in project bamboobsc by billchen198318.
the class SystemExpressionJobUtils method executeJobs.
public static void executeJobs() throws ServiceException, Exception {
List<ExpressionJobObj> jobObjList = getExpressionJobs();
if (jobObjList == null || jobObjList.size() < 1) {
return;
}
ExecutorService exprJobPool = Executors.newFixedThreadPool(SimpleUtils.getAvailableProcessors(jobObjList.size()));
for (ExpressionJobObj jobObj : jobObjList) {
jobObj = exprJobPool.submit(new ExpressionJobExecuteCallable(jobObj)).get();
}
exprJobPool.shutdown();
}
use of com.netsteadfast.greenstep.support.ExpressionJobExecuteCallable in project bamboobsc by billchen198318.
the class SystemExpressionJobUtils method executeJobForManual.
public static SysExprJobLogVO executeJobForManual(String expressionJobOid) throws ServiceException, Exception {
ExpressionJobObj jobObj = getExpressionJobForManualMode(expressionJobOid);
ExecutorService exprJobPool = Executors.newFixedThreadPool(1);
jobObj = exprJobPool.submit(new ExpressionJobExecuteCallable(jobObj)).get();
exprJobPool.shutdown();
return jobObj.getSysExprJobLog();
}
Aggregations