From 4c3009126ff0820e3a17040bdab7eb1c71b071bc Mon Sep 17 00:00:00 2001 From: Shaun Chyxion Date: Thu, 18 Nov 2021 23:54:31 +0800 Subject: [PATCH] catch fetch calling list error --- .../service/impl/CallingListPreparedServiceImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cms/src/main/java/com/pudonghot/yo/cms/service/impl/CallingListPreparedServiceImpl.java b/cms/src/main/java/com/pudonghot/yo/cms/service/impl/CallingListPreparedServiceImpl.java index 6cd758c4..d656af8e 100644 --- a/cms/src/main/java/com/pudonghot/yo/cms/service/impl/CallingListPreparedServiceImpl.java +++ b/cms/src/main/java/com/pudonghot/yo/cms/service/impl/CallingListPreparedServiceImpl.java @@ -61,9 +61,14 @@ public class CallingListPreparedServiceImpl log.info("Operator [{}] fetch campaign [{}] remote calling list, task key [{}].", operator, campaign, taskKey); - while ((fetchedSize = doFetchRemote(operator, taskKey, campaign)) > 0) { - total += fetchedSize; - log.info("Task [{}] calling list [{}] fetched.", taskKey, fetchedSize); + try { + while ((fetchedSize = doFetchRemote(operator, taskKey, campaign)) > 0) { + total += fetchedSize; + log.info("Task [{}] calling list [{}] fetched.", taskKey, fetchedSize); + } + } + catch (final Exception e) { + log.error("Fetch campaign calling list error caused.", e); } log.info("Task [{}] calling list total [{}] fetched.", total);