Compare commits

..

No commits in common. "1bb3b8d64a5bc0265510e899012522291bb2084a" and "60b848473988c5ef00586f9997905fb8f2f44233" have entirely different histories.

1 changed files with 8 additions and 17 deletions

View File

@ -131,7 +131,7 @@ public class AutoCallTaskScheduled {
//fetch status
int pendingDuration = 60 * 1000 * 2;
int loopGap = 1000;
boolean resultFetched = false;
boolean success = false;
while (pendingDuration > 0) {
try {
Thread.sleep(loopGap);
@ -141,26 +141,18 @@ public class AutoCallTaskScheduled {
}
pendingDuration -= loopGap;
resultFetched = autoCallTaskService.step4QueryAICCTaskResult(person);
if (resultFetched) break;
success = autoCallTaskService.step4QueryAICCTaskResult(person);
if (success) break;
}
AutoCallPerson _person = autoCallTaskService.getPersonMapper().selectById(person.getId());
person = _person;
if (resultFetched) {
//获取到任务详情且有话术标签为已知晓,中断循环
if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break;
} else {
//获取任务详情超时
if (!success) {
if (person.getUploadedTimes() == 2) {
//已经呼叫两次了,中断循环
autoCallTaskService.markPersonDetailQueryTimeout(person);
break;
}
}
//重呼等15秒
if (AutoCallPerson.TAG_DONE.equals(person.getTag())) break;
try {
Thread.sleep(15*1000);
} catch (InterruptedException ignore) {
@ -168,11 +160,10 @@ public class AutoCallTaskScheduled {
break;
}
}
if (AutoCallPerson.TAG_DONE.equals(person.getTag())) {
//有话术标签为已知晓,中断后续呼叫
break;
} else {
if (!AutoCallPerson.TAG_DONE.equals(person.getTag())) {
autoCallTaskService.cancelPerson(person);
} else {
break;
}
}
} catch (Exception e) {