Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Adds -r flag to resque-web for redis connection

-r or --redis can now be used to specify the
redis connection string.

TODO: A string like redis://:secret@localhost is encountering an
error, even though it works in irb doing:

irb> require 'redis'
irb> r = Redis.connect(:url => "redis://:secret@localhost")
 => #<Redis client v2.2.2 connected to redis://localhost:6379/0 (Redis
  • Loading branch information...
commit df8963076d74c9ffb9b7e8beec5d1c8c34910370 1 parent 4d530b8
@gjastrab gjastrab authored defunkt committed
Showing with 8 additions and 0 deletions.
  1. +4 −0 README.markdown
  2. +4 −0 bin/resque-web
4 README.markdown
@@ -445,6 +445,10 @@ You can also set the namespace directly using `resque-web`:
$ resque-web -p 8282 -N myapp
+or set the Redis connection string if you need to do something like select a different database:
+ $ resque-web -p 8282 -r localhost:6379:2
### Passenger
Using Passenger? Resque ships with a `` you can use. See
4 bin/resque-web
@@ -20,4 +20,8 @@, 'resque-web', { "Using Redis namespace '#{namespace}'"
Resque.redis.namespace = namespace
+ opts.on('-r redis-connection', "--redis redis-connection", "set the Redis connection string") {|redis_conf|
+ "Using Redis connection '#{redis_conf}'"
+ Resque.redis = redis_conf
+ }
Please sign in to comment.
Something went wrong with that request. Please try again.