SHARE
TWEET

Untitled

a guest Sep 15th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. for (ScheduledThreadPoolExecutor executor : executors) {
  3.       log.info("IssueGenMatchingEventConsumer remained executor queue size before shutdown: {}", executor.getQueue().size());
  4.       executor.shutdown();
  5.       executor.awaitTermination(TERMINATION_TIMEOUT_MS, TimeUnit.MILLISECONDS);
  6.       List<Runnable> runnables = executor.shutdownNow();
  7.       int executedCnt = 0;
  8.       for (Runnable runnable : runnables) {
  9.         try {
  10.           PriceIssueGenMatchingEventWorker priceIssueGenMatchingEventWorker = (PriceIssueGenMatchingEventWorker) FutureTaskObjectExtractor.extractActualObject(runnable);
  11.           if (priceIssueGenMatchingEventWorker != null) {
  12.             if (priceIssueGenMatchingEventWorker.getEventPivotId() != null) {
  13.               pivotIdSet.add(priceIssueGenMatchingEventWorker.getEventPivotId());
  14.               executedCnt++;
  15.             }
  16.           }
  17.         } catch (Exception e) {
  18.           log.error("IssueGenMatchingEventConsumer Save to unprocessed_events throw exception", e);
  19.         }
  20.       }
  21.       log.info("IssueGenMatchingEventConsumer remained executor queue size after shutdown: {}, executedCnt: {}", runnables.size(), executedCnt);
  22.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top