Skip to content

Instantly share code, notes, and snippets.

@Unitech
Last active August 29, 2015 14:09
Show Gist options
  • Select an option

  • Save Unitech/c27cbe37ff20962ed7e3 to your computer and use it in GitHub Desktop.

Select an option

Save Unitech/c27cbe37ff20962ed7e3 to your computer and use it in GitHub Desktop.
Test remote PM2 actions
Launching interactor
[Keymetrics.io] Using (Public key: osef) (Private key: osef)
[Keymetrics.io] Launching agent
Launching Interactor exposure
[PUSH] Broadcasting UDP data: 127.0.0.1:4321
[REV] Connecting to 127.0.0.1:4322
[REV] Connected to http://127.0.0.1:4322
Got new connection in Mock server
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
[PM2] WORKER STARTED with refreshing interval: 30000
[[[[ PM2/God daemon launched ]]]]
BUS system [READY] on port /home/travis/.pm2/pub.sock
RPC interface [READY] on port /home/travis/.pm2/rpc.sock
PM2 forked
Starting execution sequence in -cluster mode- for app name:child id:0
App name:child id:0 online
Starting execution sequence in -cluster mode- for app name:child id:1
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
[PUSH] Reconnecting to PM2
[REV] Disconnected from PM2
App name:child id:1 online
Starting execution sequence in -cluster mode- for app name:child id:2
App name:child id:2 online
Starting execution sequence in -cluster mode- for app name:child id:3
App name:child id:3 online
[PM2] Process ./test/fixtures/child.js launched
Sending command {"_type":"ask"}
✓ should send ask, receive ask:rep and identify agent
Sending command {"_type":"trigger:pm2:action","method_name":"restart","parameters":{"name":"child"}}
PM2 action from remote triggered "pm2 restart {"name":"child"}"
Did you forgot to call pm2.connect(function() { }) before interacting with PM2 ?
1) should act on PM2
Sending command {"_type":"trigger:pm2:action","method_name":"restart","parameters":{"name":"childe"}}
2) should act on PM2 but handle failure
Sending command {"_type":"trigger:pm2:action","method_name":"reload","parameters":{"name":"child"}}
3) should RELOAD
Sending command {"_type":"trigger:pm2:action","method_name":"gracefulReload","parameters":{"name":"child"}}
4) should gracefulRELOAD
Sending command {"_type":"trigger:pm2:action","method_name":"reset","parameters":{"name":"child"}}
5) should RESET metadata
[PM2] Deleting all process
No output has been received in the last 10 minutes, this potentially indicates a stalled build or something wrong with the build itself.
The build has been terminated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment