fix unending updateCallDuration queue
This commit is contained in:
parent
98485bd034
commit
24e9d20fe2
@ -18,7 +18,7 @@ const updateCallDurationQueue = Queue<Payload>("api/queue/update-call-duration",
|
|||||||
data: { duration: call.duration, status: translateCallStatus(call.status) },
|
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) {
|
if (!callHasFinished) {
|
||||||
await updateCallDurationQueue.enqueue({ organizationId, callId }, { delay: "30s" });
|
await updateCallDurationQueue.enqueue({ organizationId, callId }, { delay: "30s" });
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user