/usr/local/lib/node_modules/pm2/lib
NameSizeModeActions
API/-0755rm
binaries/-0755rm
God/-0755rm
templates/-0755rm
tools/-0755rm
API.js601540644editdlrm
Client.js204480644editdlrm
Common.js265320644editdlrm
completion.js68710644editdlrm
completion.sh11910644editdlrm
Configuration.js65490644editdlrm
Daemon.js129570644editdlrm
Event.js11230644editdlrm
God.js190040644editdlrm
HttpInterface.js23000644editdlrm
motd12490644editdlrm
ProcessContainer.js88160644editdlrm
ProcessContainerBun.js108190644editdlrm
ProcessContainerFork.js12800644editdlrm
ProcessContainerForkBun.js9870644editdlrm
ProcessUtils.js14230644editdlrm
TreeKill.js27910644editdlrm
Utility.js85130644editdlrm
VersionCheck.js10220644editdlrm
Watcher.js29780644editdlrm
Worker.js49790644editdlrm
Edit: /usr/local/lib/node_modules/pm2/lib/Event.js (1123B)
/** * Copyright 2013-2022 the PM2 project authors. All rights reserved. * Use of this source code is governed by a license that * can be found in the LICENSE file. */ var Utility = require('./Utility.js'); module.exports = function(God) { God.notify = function(action_name, data, manually) { God.bus.emit('process:event', { event : action_name, manually : typeof(manually) == 'undefined' ? false : true, process : Utility.formatCLU(data), at : Utility.getDate() }); }; God.notifyByProcessId = function(opts, cb) { if (typeof(opts.id) === 'undefined') { return cb(new Error('process id missing')); } var proc = God.clusters_db[opts.id]; if (!proc) { return cb(new Error('process id doesnt exists')); } God.bus.emit('process:event', { event : opts.action_name, manually : typeof(opts.manually) == 'undefined' ? false : true, process : Utility.formatCLU(proc), at : Utility.getDate() }); process.nextTick(function() { return cb ? cb(null) : false; }); return false; }; };