Files
enigma-bbs/core/misc_scheduled_events.js
Bryan Ashby 9e5b3369a5 New live stat: Total new users today
* Add NT (Obv/2 throwback) MCI for new users today
* Keep live stat up to date in stat log
* Exposed via WFC
2022-05-07 10:48:40 -06:00

24 lines
579 B
JavaScript

/* jslint node: true */
'use strict';
const StatLog = require('./stat_log.js');
const SysProps = require('./system_property.js');
exports.dailyMaintenanceScheduledEvent = dailyMaintenanceScheduledEvent;
function dailyMaintenanceScheduledEvent(args, cb) {
//
// Various stats need reset daily
//
// :TODO: files/etc. here
const resetProps = [
SysProps.LoginsToday, SysProps.MessagesToday, SysProps.NewUsersTodayCount,
];
resetProps.forEach(prop => {
StatLog.setNonPersistentSystemStat(prop, 0);
});
return cb(null);
}