Haseeb Ahmad
Haseeb Ahmad

Reputation: 8730

How to connect with separate redis instance in resque rails

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.

Upvotes: 1

Views: 276

Answers (1)

max pleaner
max pleaner

Reputation: 26758

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.

Upvotes: 1

Related Questions