forked from LiteNet/freepbx-stats
h
This commit is contained in:
parent
980ad28411
commit
86476bb2b5
2
index.js
2
index.js
|
@ -97,6 +97,8 @@ function updateRecords(callStats) {
|
||||||
records.callRecord.date = yesterdayDateString;
|
records.callRecord.date = yesterdayDateString;
|
||||||
callStats.isNewRecord = true;
|
callStats.isNewRecord = true;
|
||||||
console.log(`New all-time record: ${previousRecord.count} calls on ${yesterdayDateString}, previous record was ${records.callRecord.count} calls on ${records.callRecord.date}`);
|
console.log(`New all-time record: ${previousRecord.count} calls on ${yesterdayDateString}, previous record was ${records.callRecord.count} calls on ${records.callRecord.date}`);
|
||||||
|
} else {
|
||||||
|
console.log(`No new record. Yesterday: ${callStats.totalCallsMade}, Record: ${previousRecord.count} on ${previousRecord.date}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// pass record to call stats for reporting
|
// pass record to call stats for reporting
|
||||||
|
|
Loading…
Reference in a new issue