我正在使用 resque gem -
(1.27.4)
我将我的redis-rb
宝石从5.0.6
升级到3.3.5
。
在我的rails应用中,我初始化Resque的redis实例如下:
Resque.redis = Redis.new(creds)
现在我明白了,在这个版本中,redis 使用的是 redis-client gem:
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.14.0)
我知道这对数据类型非常严格并且有严格的检查如下:
case element
when String
element
when Integer, Float, Symbol
element.to_s
when Class
element.to_s
else
raise TypeError, "Unsupported command argument type: #{element}"
end
end
我的疑问是——这里有什么解决方法吗,我不想升级 resque,我需要这个版本的 redis 来尝试重新连接。