jenia
jenia

Reputation: 55

Remote Redis Server from Resque Standalone

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!

Upvotes: 0

Views: 715

Answers (1)

Anthony
Anthony

Reputation: 15957

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

Upvotes: 1

Related Questions