Reputation: 21564
In rails, it is easy to just add a config/resque.yml, but we're running a gem on the command line and we would like to tell it where to look for Resque jobs instead of the default localhost:6379
Right now, we run our gem by going to the gem lib and then running rake resque:work etc etc.. so how do we tell it where redis is?(redis could be in another machine in the network or in the cloud)
Upvotes: 1
Views: 1346
Reputation: 3022
Building on corroded's answer, I had to do this:
require "./my_class"
require "resque"
Resque.redis = 'server:port'
require "resque/tasks"
Upvotes: 1
Reputation: 21564
We fixed this by just adding Resque.redis = 'server:port
in our gem's Rakefile, just before we included resque via require 'resque/tasks'
Upvotes: 0