I'm running an app on heroku. The web worker is developed in the Grape framework.
As Grape doesn't have anything like config/initializers, I'm running a code like this before each access to Resque:
HEROKU_REDIS_URL = "redis://redistogo:XXXXX@squawfish.redistogo.com:9990/"
uri = URI.parse(HEROKU_REDIS_URL)
Resque.redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password, :thread_safe => false)
After a while the Resque worker stops picking up jobs from Redis, even though some are queued there. When running locally everything works fine.
Any idea what am I doing wrong? Or where should I put the Resque's Redis initialization?