Adjust intervals
We still fetch voicemails from RingCentral every 60 seconds, but now we check for missing transcriptions every 15 seconds, and poll the database for voicemails that are ready to be ticketized every second.
This commit is contained in:
parent
3452cd143a
commit
1052dfc1b1
@ -418,22 +418,20 @@ export function ticketize(
|
||||
return [
|
||||
setAsyncInterval(
|
||||
() => {
|
||||
const promise = fetchAndStoreNewVoicemails(firstRun);
|
||||
const promise = fetchAndStoreNewVoicemails(firstRun).catch(
|
||||
catchHandler
|
||||
);
|
||||
firstRun = false;
|
||||
return promise.catch(catchHandler);
|
||||
return promise;
|
||||
},
|
||||
60 * 1000,
|
||||
true // immediate
|
||||
),
|
||||
setAsyncInterval(
|
||||
() => fetchMissingTranscriptions().catch(catchHandler),
|
||||
60 * 1000,
|
||||
true
|
||||
),
|
||||
setAsyncInterval(
|
||||
() => createTickets().catch(catchHandler),
|
||||
60 * 1000,
|
||||
15 * 1000,
|
||||
true
|
||||
),
|
||||
setAsyncInterval(() => createTickets().catch(catchHandler), 1000, true),
|
||||
];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user