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
This commit is contained in:
Bryan Ashby
2022-05-07 10:48:40 -06:00
parent bb86f386e9
commit 9e5b3369a5
13 changed files with 49 additions and 22 deletions

View File

@@ -3,6 +3,7 @@
const Events = require('./events.js');
const LogNames = require('./user_log_name.js');
const SysProps = require('./system_property.js');
const DefaultKeepForDays = 365;
@@ -26,6 +27,7 @@ module.exports = function systemEventUserLogInit(statLog) {
const detailHandler = {
[ systemEvents.NewUser ] : (e) => {
append(e, LogNames.NewUser, 1);
statLog.incrementNonPersistentSystemStat(SysProps.NewUsersTodayCount, 1);
},
[ systemEvents.UserLogin ] : (e) => {
append(e, LogNames.Login, 1);