Created
January 27, 2012 11:40
-
-
Save AurelienGasser/1688410 to your computer and use it in GitHub Desktop.
coffee-resque heroku test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var resque = require('./coffee-resque'); | |
process.on('SIGTERM', function() { | |
console.log('SIGTERM SIGNAL CAUGHT!!!'); | |
process.exit(0) | |
}); | |
var worker = resque.connect({ | |
host: 'xxx', | |
port: xxx, | |
password: 'xxx', | |
timeout: 1000 | |
}).worker('testqueue', { | |
new_message: function() { } | |
}); | |
worker.start(); | |
// listen on $PORT so that heroku doesn't kill the app | |
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\n'); | |
}).listen(process.env.PORT); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment