File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,16 @@ module Resque
26
26
# Accepts:
27
27
# 1. A 'hostname:port' string
28
28
# 2. A 'hostname:port:db' string (to select the Redis db)
29
- # 3. An instance of `Redis`, `Redis::Client`, or `Redis::Namespace`.
29
+ # 3. An instance of `Redis`, `Redis::Client`, `Redis::DistRedis`,
30
+ # or `Redis::Namespace`.
30
31
def redis = ( server )
31
32
case server
32
33
when String
33
34
host , port , db = server . split ( ':' )
34
35
redis = Redis . new ( :host => host , :port => port ,
35
36
:thread_safe => true , :db => db )
36
37
@redis = Redis ::Namespace . new ( :resque , :redis => redis )
37
- when Redis , Redis ::Client
38
+ when Redis , Redis ::Client , Redis :: DistRedis
38
39
@redis = Redis ::Namespace . new ( :resque , :redis => server )
39
40
when Redis ::Namespace
40
41
@redis = server
You can’t perform that action at this time.
0 commit comments