enigma-bbs/core/misc_scheduled_events.js

19 lines
470 B
JavaScript
Raw Normal View History

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