Skip to content

Instantly share code, notes, and snippets.

@AurelienGasser
Created January 27, 2012 11:40
Show Gist options
  • Save AurelienGasser/1688410 to your computer and use it in GitHub Desktop.
Save AurelienGasser/1688410 to your computer and use it in GitHub Desktop.
coffee-resque heroku test
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