enigma-bbs/core/misc_scheduled_events.js

19 lines
465 B
JavaScript
Raw Normal View History

2019-02-09 17:56:36 +00:00
/* jslint node: true */
'use strict';
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
//
[SysProps.LoginsToday, SysProps.MessagesToday].forEach(prop => {
2019-02-09 17:56:36 +00:00
StatLog.setNonPersistentSystemStat(prop, 0);
});
return cb(null);
}