2019-02-09 17:56:36 +00:00
|
|
|
/* jslint node: true */
|
|
|
|
'use strict';
|
|
|
|
|
2022-06-05 20:04:25 +00:00
|
|
|
const StatLog = require('./stat_log.js');
|
|
|
|
const SysProps = require('./system_property.js');
|
2019-02-09 17:56:36 +00:00
|
|
|
|
2019-02-10 19:31:25 +00:00
|
|
|
exports.dailyMaintenanceScheduledEvent = dailyMaintenanceScheduledEvent;
|
2019-02-09 17:56:36 +00:00
|
|
|
|
2019-02-10 19:31:25 +00:00
|
|
|
function dailyMaintenanceScheduledEvent(args, cb) {
|
2019-02-09 17:56:36 +00:00
|
|
|
//
|
|
|
|
// Various stats need reset daily
|
|
|
|
//
|
2022-06-05 20:04:25 +00:00
|
|
|
[SysProps.LoginsToday, SysProps.MessagesToday].forEach(prop => {
|
2019-02-09 17:56:36 +00:00
|
|
|
StatLog.setNonPersistentSystemStat(prop, 0);
|
|
|
|
});
|
|
|
|
|
|
|
|
return cb(null);
|
|
|
|
}
|