on ‎2019 Jun 25 7:04 PM
Hi Experts,
I have a cronJob in which I execute a Callable from an ExecutorService as follows:
final ExecutorService executor = Executors.newFixedThreadPool(nbProcessors, getTenantAwareThreadFactory());
int size = productList.size();
int step = size / nbProcessors;
int startIndex;
int endIndex;
List<Future<IceWorkerResultData>> futures = new ArrayList<>();
for (int i = 0; i < nbProcessors; i++) {
startIndex = i * step;
if (i == nbProcessors -1) {
endIndex = size;
}
else {
endIndex = (i + 1) * step;
}
futures.add(executor.submit(new IceWorkerTask(startIndex, endIndex, productList, cronJob, dept, resolveType, pidNotUpdated, isKsaBaseStore, apiUrl, authLogon, authKey)));
}
executor.shutdown();
In this Calloable (IceWorkerTask) I have log Info appended in a file and which is no longer displayed. On the other hand, before without the use of ExecutorService and Callable (Without threads) the log is displayed perfectly
Here are my cronjob configuration :

Thanks in advance.
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.