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