0
votes

I want to run Resque workers on different servers, getting jobs from one Redis server. I know how to configure it in a Rails application, but the problem is I am using standalone Resque (https://github.com/dcestari/resque-standalone-sample) on every Server.

So my question is, how can I do this without installing a Rails application and is it possible?

Thank you!

1
also it's a little deterring to answer questions for a user that has never accepted an answer before, you should really make it a point to accept them when they are correct. - Anthony

1 Answers

1
votes

You'll need to tell Resque where Redis lives:

Resque.configure do |config|

  # Set the redis connection. Takes any of:
  #   String - a redis url string (e.g., 'redis://host:port')
  #   String - 'hostname:port[:db][/namespace]'
  #   Redis - a redis connection that will be namespaced :resque
  #   Redis::Namespace - a namespaced redis connection that will be used as-is
  #   Redis::Distributed - a distributed redis connection that will be used as-is
  #   Hash - a redis connection hash (e.g. {:host => 'localhost', :port => 6379, :db => 0})
  config.redis = 'redis://someserverip:port:db/namespace'

end