fix unending updateCallDuration queue

This commit is contained in:
m5r 2021-09-01 06:42:59 +08:00
parent 98485bd034
commit 24e9d20fe2

View File

@ -18,7 +18,7 @@ const updateCallDurationQueue = Queue<Payload>("api/queue/update-call-duration",
data: { duration: call.duration, status: translateCallStatus(call.status) },
});
const callHasFinished = ["busy", "no-answer", "canceled", "failed"].includes(call.status);
const callHasFinished = ["completed", "busy", "no-answer", "canceled", "failed"].includes(call.status);
if (!callHasFinished) {
await updateCallDurationQueue.enqueue({ organizationId, callId }, { delay: "30s" });
}