This commit is contained in:
Dave Horton
2025-01-10 19:06:29 -05:00
parent 53a205db7d
commit 6e892cb48f

View File

@@ -154,17 +154,17 @@ const nudgeCallCounts = async(logger, sids, nudgeOperator, writers, direction) =
service_provider_sid, account_sid, application_sid
}, `call counts after ${direction > 0 ? 'increment' : 'decrement'}`);
if (process.env.JAMBONES_DEBUG_CALL_COUNTS) {
const {srf} = require('..');
const {addKey, deleteKey} = srf.locals.realtimeDbHelpers;
//if (process.env.JAMBONES_DEBUG_CALL_COUNTS) {
const {srf} = require('..');
const {addKey, deleteKey} = srf.locals.realtimeDbHelpers;
if (direction > 0) {
await addKey(`debug:incalls:${account_sid}:${callId}`, Date.now());
}
else {
await deleteKey(`debug:incalls:${account_sid}:${callId}`);
}
if (direction > 0) {
await addKey(`debug:incalls:${account_sid}:${callId}`, Date.now());
}
else {
await deleteKey(`debug:incalls:${account_sid}:${callId}`);
}
//}
if (process.env.JAMBONES_TRACK_SP_CALLS) {
writes.push(writeCallCountSP({ service_provider_sid, calls_in_progress: callsSP }));