Sending HipChat Tower messages upon server death, I hope.

This commit is contained in:
Nick Winter 2015-04-16 15:29:13 -07:00
parent 5bae839288
commit 95eade4268

View file

@ -5,7 +5,13 @@ if cluster.isMaster
for i in [0...numCPUs] for i in [0...numCPUs]
cluster.fork() cluster.fork()
cluster.on 'exit', (worker, code, signal) -> cluster.on 'exit', (worker, code, signal) ->
console.log 'worker ' + worker.id + ' died' message = "Worker #{worker.id} died! Heart attack takin' a dump."
console.log message
try
hipchat = require './server/hipchat'
hipchat.sendHipChatMessage(message, ['tower'], {papertrail: true})
catch error
console.log "Couldn't send HipChat message on server death:", error
cluster.fork() cluster.fork()
else else
require('coffee-script') require('coffee-script')