mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-18 01:42:20 +00:00
feat(logging): timestamp active handles output
This commit is contained in:
parent
a698559c04
commit
c761944c35
1 changed files with 2 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ var isDev = nconf.get('NODE_ENV') === 'development';
|
|||
var DISABLE_LOGGING = nconf.get('DISABLE_REQUEST_LOGGING');
|
||||
var cores = +nconf.get("WEB_CONCURRENCY") || 0;
|
||||
var activeHandles = require('active-handles');
|
||||
var moment = require('moment');
|
||||
|
||||
if (cores!==0 && cluster.isMaster && (isDev || isProd)) {
|
||||
// Fork workers. If config.json has CORES=x, use that - otherwise, use all cpus-1 (production)
|
||||
|
|
@ -167,6 +168,7 @@ if (cores!==0 && cluster.isMaster && (isDev || isProd)) {
|
|||
var activeHandleInterval = setInterval(logHandles, logHandlesInterval);
|
||||
|
||||
function logHandles() {
|
||||
console.log(moment().format());
|
||||
activeHandles.print({highlight:false});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue