Compare commits

...

3 Commits

Author SHA1 Message Date
ac30269c81 Fix getMisisngTranscriptionVoicemails
Meant whereNull, not whereNotNull.
2021-03-13 15:08:14 -07:00
1d4b0cbac3 Add request logging 2021-03-13 15:05:53 -07:00
83784bec8f Improve refresh error logging 2021-03-13 14:51:32 -07:00
2 changed files with 6 additions and 2 deletions

View File

@ -70,7 +70,11 @@ async function initRingCentralSDK() {
}); });
const platform = sdk.platform(); const platform = sdk.platform();
platform.on(platform.events.refreshError, (err) => { platform.on(platform.events.refreshError, (err) => {
console.error(err); console.error("Refresh error", err);
});
const client = sdk.client();
client.on(client.events.beforeRequest, (request) => {
console.log(request.url);
}); });
await sdk.login({ await sdk.login({
username: process.env.RC_LOGIN_USERNAME, username: process.env.RC_LOGIN_USERNAME,

View File

@ -296,7 +296,7 @@ export function ticketize(
*/ */
async function getMissingTranscriptionVoicemails() { async function getMissingTranscriptionVoicemails() {
return await db("voicemails") return await db("voicemails")
.whereNotNull("transcription") .whereNull("transcription")
.whereNotIn("transcriptionStatus", [ .whereNotIn("transcriptionStatus", [
// Don't include those whose transcriptions have failed or will not // Don't include those whose transcriptions have failed or will not
// be completed. // be completed.