How to connect with separate redis instance in resque rails

269 Views Asked by At

There are two in redis setup and their instances in my app. One for redis cache. I want that for background jobs I will use another instance.

I can't find a way where i define resqu to use specific redis address.

1

There are 1 best solutions below

0
max pleaner On BEST ANSWER

As described in the readme, you can point Resque to any Redis using the configuration file.

# config/resque.yml:

development: some_host:6379

Then using redis-rails you can configure a different connnection for the cache, for example:

# config/environments/development.rb:

config.cache_store = :redis_store, "redis://other_host:6379/0/cache"

You would need to fill it in for the other environments as well.