mirror of
https://github.com/Unitech/pm2.git
synced 2025-12-08 20:35:53 +00:00
update unix socket protocol
This commit is contained in:
parent
eb59a396eb
commit
64413b016c
@ -9,12 +9,13 @@ pm2.connect(function() {
|
||||
pm2.start('examples/kill-not-so-fast.js', {
|
||||
instances:10,
|
||||
minUptime: 0,
|
||||
force:true,
|
||||
maxRestarts : 0
|
||||
}, function() {
|
||||
pm2.start('examples/auto-save.js', {execMode : 'fork', watch:true, force : true}, function() {
|
||||
pm2.start('examples/custom_action_with_params.js', function() {
|
||||
//pm2.start('examples/auto-bench.js', {instances : 'max'}, function() {
|
||||
pm2.start('examples/throw.js', {name:'auto-throw'}, function() {
|
||||
pm2.start('examples/throw.js', {force:true, name:'auto-throw'}, function() {
|
||||
pm2.disconnect(function() { process.exit(1); });
|
||||
});
|
||||
});
|
||||
|
||||
@ -9,7 +9,7 @@ module.exports = function ForkMode(God) {
|
||||
event : action_name,
|
||||
manually : typeof(manually) == 'undefined' ? false : true,
|
||||
process : Common.formatCLU(data),
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
});
|
||||
};
|
||||
|
||||
@ -22,7 +22,7 @@ module.exports = function ForkMode(God) {
|
||||
event : opts.action_name,
|
||||
manually : typeof(opts.manually) == 'undefined' ? false : true,
|
||||
process : Common.formatCLU(proc),
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
});
|
||||
|
||||
process.nextTick(function() {
|
||||
|
||||
@ -31,10 +31,6 @@ module.exports = function ClusterMode(God) {
|
||||
God.nodeApp = function nodeApp(env_copy, cb){
|
||||
var clu = null;
|
||||
|
||||
// if (fs.existsSync(env_copy.pm_exec_path) == false) {
|
||||
// return cb(God.logAndGenerateError('Script ' + env_copy.pm_exec_path + ' missing'), {});
|
||||
// }
|
||||
|
||||
console.log('Starting execution sequence in -cluster mode- for app name:%s id:%s',
|
||||
env_copy.name,
|
||||
env_copy.pm_id);
|
||||
|
||||
@ -150,7 +150,7 @@ module.exports = function ForkMode(God) {
|
||||
process : Common.formatCLU(cspr),
|
||||
data : {
|
||||
str : data.toString(),
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
}
|
||||
});
|
||||
});
|
||||
@ -166,7 +166,7 @@ module.exports = function ForkMode(God) {
|
||||
God.bus.emit('log:out', {
|
||||
process : Common.formatCLU(cspr),
|
||||
str : data.toString(),
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ var PushInteractor = module.exports = {
|
||||
* Handle PM2 connection state changes
|
||||
*/
|
||||
this.ipm2.on('ready', function() {
|
||||
console.log('[PUSH] Connected to PM2');
|
||||
console.log('[PUSH] Connected to local PM2');
|
||||
PushInteractor.pm2_connected = true;
|
||||
PushInteractor.startWorker();
|
||||
});
|
||||
@ -155,7 +155,7 @@ var PushInteractor = module.exports = {
|
||||
if (process.env.NODE_ENV && process.env.NODE_ENV == 'test') {
|
||||
data = {
|
||||
public_key : PushInteractor.conf.PUBLIC_KEY,
|
||||
sent_at : new Date(),
|
||||
sent_at : Date.now(),
|
||||
data : self._packet
|
||||
};
|
||||
}
|
||||
@ -165,14 +165,12 @@ var PushInteractor = module.exports = {
|
||||
* Cipher data with AES256
|
||||
*/
|
||||
|
||||
//console.log(self._packet);
|
||||
|
||||
var cipheredData = Cipher.cipherMessage(JSON.stringify(self._packet),
|
||||
PushInteractor.conf.SECRET_KEY);
|
||||
|
||||
data = {
|
||||
public_key : self.conf.PUBLIC_KEY,
|
||||
sent_at : new Date(),
|
||||
sent_at : Date.now(),
|
||||
data : cipheredData
|
||||
};
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ function exec(script, outFile, errFile) {
|
||||
type : 'log:err',
|
||||
data : {
|
||||
str : string,
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -138,7 +138,7 @@ function exec(script, outFile, errFile) {
|
||||
type : 'log:out',
|
||||
data : {
|
||||
str : string,
|
||||
at : new Date()
|
||||
at : Date.now()
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -168,7 +168,7 @@ function exec(script, outFile, errFile) {
|
||||
errObj[key] = err[key];
|
||||
});
|
||||
|
||||
errObj.at = new Date();
|
||||
errObj.at = Date.now();
|
||||
|
||||
process.send({
|
||||
type : 'process:exception',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "pm2",
|
||||
"preferGlobal": "true",
|
||||
"version": "0.11.0-beta1",
|
||||
"version": "0.11.0-beta2",
|
||||
"os": [
|
||||
"!win32"
|
||||
],
|
||||
@ -133,8 +133,8 @@
|
||||
"nssocket" : "0.5.1",
|
||||
"pidusage" : "0.1.0",
|
||||
|
||||
"axm" : "0.2.0",
|
||||
"pm2-axon" : "2.0.3",
|
||||
"axm" : "0.2.4",
|
||||
"pm2-axon" : "2.0.4",
|
||||
"pm2-axon-rpc" : "0.3.3",
|
||||
"pm2-deploy" : "~0.1.0",
|
||||
"pm2-interface" : "2.0.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user