Getting Kue working on Heroku
This example shows how to run a Kue job queue on Heroku with separate web and worker processes. The web server, built with Express, creates a job on an HTTP request, while the worker processes it using `jobs.process`. Both the web app and the consumer connect to a RedisToGo instance by overriding `kue.redis.createClient` to parse the `REDISTOGO_URL`, and the `Procfile` defines the process types that Heroku scales independently.
AI-generated descriptionWorkers can be activated with heroku scale:
heroku scale web=1 worker=1
Each process is $0.05/hr (or about $35/month).
You'll need a Redis instance. For RedisToGo you need a mini or higher to accept two connections AFAICS. Not sure what the upper limit is on workers yet.
heroku addons:add redistogo:mini
A mini instance is just $5 a month and should be billed by the second. To remove, do:
heroku addons:remove redistogo