mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
more verbosity on Interactor when running on Travis
This commit is contained in:
parent
2b589d3f51
commit
71c2af2a72
@ -12,7 +12,7 @@ module.exports = function(God) {
|
||||
|
||||
God.lock = function(opts, cb) {
|
||||
var proc_name = opts.name;
|
||||
var metadata = opts.meta || {};
|
||||
var metadata = opts.meta || {};
|
||||
var processes = God.findByName(opts.name);
|
||||
var is_locked = false;
|
||||
var proc_keys = Object.keys(processes);
|
||||
@ -26,6 +26,8 @@ module.exports = function(God) {
|
||||
break;
|
||||
}
|
||||
|
||||
console.log('Locking %s', proc.pm2_env.pm_id);
|
||||
|
||||
proc.pm2_env.command.locked = true;
|
||||
proc.pm2_env.command.started_at = Date.now();
|
||||
|
||||
|
||||
@ -177,8 +177,19 @@ var UX = require('../CliUx.js');
|
||||
InteractorDaemonizer.daemonize = function(infos, cb) {
|
||||
var InteractorJS = path.resolve(path.dirname(module.filename), 'Daemon.js');
|
||||
|
||||
var out = fs.openSync(cst.INTERACTOR_LOG_FILE_PATH, 'a'),
|
||||
err = fs.openSync(cst.INTERACTOR_LOG_FILE_PATH, 'a');
|
||||
var out = null;
|
||||
var err = null;
|
||||
|
||||
if (process.env.TRAVIS) {
|
||||
// Redirect PM2 internal err and out
|
||||
// to STDERR STDOUT when running with Travis
|
||||
out = 1;
|
||||
err = 2;
|
||||
}
|
||||
else {
|
||||
out = fs.openSync(cst.INTERACTOR_LOG_FILE_PATH, 'a');
|
||||
err = fs.openSync(cst.INTERACTOR_LOG_FILE_PATH, 'a');
|
||||
}
|
||||
|
||||
var child = require('child_process').spawn('node', [InteractorJS], {
|
||||
silent : false,
|
||||
|
||||
@ -172,10 +172,10 @@ describe('Test remote PM2 actions', function() {
|
||||
|
||||
it('should act on PM2 but handle failure', function(done) {
|
||||
send_cmd.once('trigger:pm2:result', function(pck) {
|
||||
|
||||
/**
|
||||
* Once remote command is finished...
|
||||
*/
|
||||
|
||||
should.exist(pck.ret.err);
|
||||
|
||||
cmd_pm2.list(function(err, ret) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user