Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when removing queue #8

Closed
rkistner opened this issue Jun 13, 2011 · 3 comments
Closed

Error when removing queue #8

rkistner opened this issue Jun 13, 2011 · 3 comments

Comments

@rkistner
Copy link

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
Copy link
Member

jayniz commented Jun 13, 2011

thanks, can i pull from somewhere?

@rkistner
Copy link
Author

I haven't branched it or written any tests, but it's only the small
modification in the method I pasted.

On Mon, Jun 13, 2011 at 7:58 PM, jayniz <
reply@reply.github.com>wrote:

thanks, can i pull from somewhere?

Reply to this email directly or view it on GitHub:
#8 (comment)

@jayniz
Copy link
Member

jayniz commented Jul 15, 2011

closed in pull request #9

@jayniz jayniz closed this as completed Jul 15, 2011
jayniz added a commit that referenced this issue Jul 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants