在我的应用程序中,redis设置有两个实例。一种用于Redis缓存。我希望对于后台作业,我将使用另一个实例。
我找不到定义resqu以使用特定Redis地址的方法。
答案 0 :(得分:1)
如in the readme所述,您可以使用配置文件将Resque指向任何Redis。
# config/resque.yml:
development: some_host:6379
然后使用redis-rails可以为缓存配置其他连接,例如:
# config/environments/development.rb:
config.cache_store = :redis_store, "redis://other_host:6379/0/cache"
您还需要在其他环境中填写它。