Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Error when removing queue #8

Closed
rkistner opened this Issue · 3 comments

2 participants

@rkistner

When I remove a queue without any scheduled jobs, I get the following error:

RuntimeError: ERR wrong number of arguments for 'del' command
    redis (2.2.0) lib/redis/client.rb:39:in `call'
    redis (2.2.0) lib/redis.rb:674:in `block in del'
    /usr/local/lib/ruby/1.9.1/monitor.rb:201:in `mon_synchronize'
    redis (2.2.0) lib/redis.rb:673:in `del'
    /usr/local/lib/ruby/gems/1.9.1/gems/redis-namespace-1.0.3/lib/redis/namespace.rb:213:in `method_missing'
    /usr/local/lib/ruby/gems/1.9.1/gems/resque-loner-0.1.3/lib/resque-loner/helpers.rb:54:in `cleanup_loners'
    /usr/local/lib/ruby/gems/1.9.1/gems/resque-loner-0.1.3/lib/resque-ext/resque.rb:26:in `remove_queue_with_loner_cleanup'

This is with resque-loner 0.1.3, Resque 1.16.1 and Redis gem 2.2.0.

The following monkey-patch solves the issue for me:

module Resque
  module Plugins
    module Loner
      class Helpers
        def self.cleanup_loners(queue)
          keys = redis.keys("loners:queue:#{queue}:job:*")
          redis.del(*keys) unless keys.empty?
        end
      end
    end
  end
end
@jayniz
Owner

thanks, can i pull from somewhere?

@rkistner
@jayniz
Owner

closed in pull request #9

@jayniz jayniz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.