mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-06 12:47:13 +02:00
More user/system stat constants & usage
This commit is contained in:
parent
e464f95924
commit
ec97b3e8d4
14 changed files with 99 additions and 53 deletions
|
@ -11,6 +11,7 @@ const logger = require('./logger.js');
|
|||
const database = require('./database.js');
|
||||
const resolvePath = require('./misc_util.js').resolvePath;
|
||||
const UserProps = require('./user_property.js');
|
||||
const SysProps = require('./system_property.js');
|
||||
|
||||
// deps
|
||||
const async = require('async');
|
||||
|
@ -246,13 +247,13 @@ function initialize(cb) {
|
|||
|
||||
if(err) {
|
||||
propLoadOpts.names.concat('username').forEach(v => {
|
||||
StatLog.setNonPeristentSystemStat(`sysop_${v}`, 'N/A');
|
||||
StatLog.setNonPersistentSystemStat(`sysop_${v}`, 'N/A');
|
||||
});
|
||||
} else {
|
||||
opProps.username = opUserName;
|
||||
|
||||
_.each(opProps, (v, k) => {
|
||||
StatLog.setNonPeristentSystemStat(`sysop_${k}`, v);
|
||||
StatLog.setNonPersistentSystemStat(`sysop_${k}`, v);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -265,7 +266,7 @@ function initialize(cb) {
|
|||
getAreaStats( (err, stats) => {
|
||||
if(!err) {
|
||||
const StatLog = require('./stat_log.js');
|
||||
StatLog.setNonPeristentSystemStat('file_base_area_stats', stats);
|
||||
StatLog.setNonPersistentSystemStat(SysProps.FileBaseAreaStats, stats);
|
||||
}
|
||||
|
||||
return callback(null);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue