mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 07:04:32 +02:00
+ MCI: PT - total messages posted today (non-private)
+ MCI: TP - total messages/posts on system (non-private, includes imports, only counts *current*, not all of time) * Move some stats to startup() calls * Fix some DATE() comparisons in SQL to use 'localtime' as our timestamps include TZ * Update luciano_blocktronics SYSSTAT to show more info
This commit is contained in:
parent
fb13381bb5
commit
6cce013187
12 changed files with 98 additions and 26 deletions
|
@ -21,6 +21,8 @@ const copyFileWithCollisionHandling = require('../file_util.js').copyFileWit
|
|||
const getAreaStorageDirectoryByTag = require('../file_base_area.js').getAreaStorageDirectoryByTag;
|
||||
const isValidStorageTag = require('../file_base_area.js').isValidStorageTag;
|
||||
const User = require('../user.js');
|
||||
const StatLog = require('../stat_log.js');
|
||||
const SysProps = require('../system_property.js');
|
||||
|
||||
// deps
|
||||
const moment = require('moment');
|
||||
|
@ -1261,12 +1263,12 @@ function FTNMessageScanTossModule() {
|
|||
}
|
||||
}
|
||||
|
||||
// we do this after such that error cases can be preseved above
|
||||
// we do this after such that error cases can be preserved above
|
||||
if(lookupName !== message.toUserName) {
|
||||
message.toUserName = localUserName;
|
||||
}
|
||||
|
||||
// set the meta information - used elsehwere for retrieval
|
||||
// set the meta information - used elsewhere for retrieval
|
||||
message.meta.System[Message.SystemMetaNames.LocalToUserID] = localToUserId;
|
||||
return callback(null);
|
||||
});
|
||||
|
@ -1277,6 +1279,10 @@ function FTNMessageScanTossModule() {
|
|||
|
||||
// save to disc
|
||||
message.persist(err => {
|
||||
if(!message.isPrivate()) {
|
||||
StatLog.incrementNonPersistentSystemStat(SysProps.MessageTotalCount, 1);
|
||||
StatLog.incrementNonPersistentSystemStat(SysProps.MessagesToday, 1);
|
||||
}
|
||||
return callback(err);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue