+ 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:
Bryan Ashby 2018-11-27 21:21:00 -07:00
parent fb13381bb5
commit 6cce013187
12 changed files with 98 additions and 26 deletions

View file

@ -239,7 +239,10 @@ module.exports = class Message {
filter.toUserName
filter.fromUserName
filter.replyToMesageId
filter.newerThanTimestamp
filter.newerThanTimestamp - may not be used with |date|
filter.date - moment object - may not be used with |newerThanTimestamp|
filter.newerThanMessageId
filter.areaTag - note if you want by conf, send in all areas for a conf
*filter.metaTuples - {category, name, value}
@ -356,7 +359,10 @@ module.exports = class Message {
});
if(_.isString(filter.newerThanTimestamp) && filter.newerThanTimestamp.length > 0) {
// :TODO: should be using "localtime" here?
appendWhereClause(`DATETIME(m.modified_timestamp) > DATETIME("${filter.newerThanTimestamp}", "+1 seconds")`);
} else if(moment.isMoment(filter.date)) {
appendWhereClause(`DATE(m.modified_timestamp, "localtime") = DATE("${filter.date.format('YYYY-MM-DD')}")`);
}
if(_.isNumber(filter.newerThanMessageId)) {