resque-loner icon indicating copy to clipboard operation
resque-loner copied to clipboard

Enqueue fails / Conflict with redis_namespace 1.3.1

Open ticktricktrack opened this issue 12 years ago • 1 comments

With resque-loner 1.2.1 and redis-namespace 1.3.1 I get an error when enqueueing jobs. On every job, every class, no matter if resque-loner is actually being used or not.

I created a minimized example to test this at: https://github.com/ticktricktrack/resque_loner_namespace_conflict

With redis-namespace 1.3.0 things works fine.

Resque.enqueue(Dummy)
NoMethodError: undefined method `is_a?' for #<Redis::Future:0x007fb846086668>
  from ruby_path/gems/redis-namespace-1.3.1/lib/redis/namespace.rb:320:in `method_missing'
  from ruby_path/gems/resque-1.23.0/lib/resque.rb:196:in `watch_queue'
  from ruby_path/gems/resque-1.23.0/lib/resque.rb:141:in `push'
  from ruby_path/gems/resque-1.23.0/lib/resque/job.rb:51:in `create'
  from ruby_path/gems/resque-loner-1.2.1/lib/resque-ext/job.rb:20:in `block in create_with_loner'
  from ruby_path/gems/redis-namespace-1.3.1/lib/redis/namespace.rb:339:in `block in namespaced_block'
  from ruby_path/gems/redis-3.0.2/lib/redis.rb:2019:in `block in multi'
  from ruby_path/gems/redis-3.0.2/lib/redis.rb:36:in `block in synchronize'
  from ruby_pathruby/1.9.1/monitor.rb:211:in `mon_synchronize'
  from ruby_path/gems/redis-3.0.2/lib/redis.rb:36:in `synchronize'
  from ruby_path/gems/redis-3.0.2/lib/redis.rb:2012:in `multi'
  from ruby_path/gems/redis-namespace-1.3.1/lib/redis/namespace.rb:337:in `namespaced_block'
  from ruby_path/gems/redis-namespace-1.3.1/lib/redis/namespace.rb:224:in `multi'
  from ruby_path/gems/resque-loner-1.2.1/lib/resque-ext/job.rb:19:in `create_with_loner'
  from ruby_path/gems/resque-1.23.0/lib/resque.rb:240:in `enqueue_to'
  from ruby_path/gems/resque-1.23.0/lib/resque.rb:221:in `enqueue'
  from (irb):1
  from ruby_path/gems/railties-3.2.12/lib/rails/commands/console.rb:47:in `start'
  from ruby_path/gems/railties-3.2.12/lib/rails/commands/console.rb:8:in `start'
  from ruby_path/gems/railties-3.2.12/lib/rails/commands.rb:41:in `<top (required)>'
  from script/rails:6:in `require'
  from script/rails:6:in `<main>'1.9.3p392 :002 > 

My Gemfile

gem 'redis', '3.0.2'
gem 'resque', '1.23.0', :require => 'resque/server'

# gem 'redis-namespace', '1.3.0'
gem 'redis-namespace', '1.3.1'

gem 'resque-loner', '1.2.1'

ticktricktrack avatar Aug 05 '13 18:08 ticktricktrack

See resque/redis-namespace#65. This is a redis version / redis-namespace version issue and not a resque-loner issue.

guitsaru avatar Aug 07 '13 00:08 guitsaru