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

Does not work with rescue-cleaner #49

Open
devnut opened this issue Jun 1, 2015 · 0 comments
Open

Does not work with rescue-cleaner #49

devnut opened this issue Jun 1, 2015 · 0 comments

Comments

@devnut
Copy link

devnut commented Jun 1, 2015

Sometimes Resque.redis.multi seems to return a <Redis::Future [:multi]> instead of an array, in which case Resque.redis.multi.first raises this error.

It was introduced here it seems:

4ae90ae

#<NoMethodError: undefined method `first' for nil:NilClass>

/usr/local/rvm/gems/ruby-2.1.1/gems/resque-loner-1.2.1/lib/resque-ext/job.rb in create_with_loner
      end.first
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in block (3 levels) in requeue
                Job.create(queue||job['queue'], job['payload']['class'], *job['payload']['args'])
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-namespace-1.4.1/lib/redis/namespace.rb in block in namespaced_block
        yield self
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-3.0.7/lib/redis.rb in block in multi
          yield(self)
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-3.0.7/lib/redis.rb in block in synchronize
    mon_synchronize { yield(@client) }
/usr/local/rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/monitor.rb in mon_synchronize
      yield
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-3.0.7/lib/redis.rb in synchronize
    mon_synchronize { yield(@client) }
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-3.0.7/lib/redis.rb in multi
    synchronize do |client|
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-namespace-1.4.1/lib/redis/namespace.rb in namespaced_block
      result = redis.send(command) do |r|
/usr/local/rvm/gems/ruby-2.1.1/gems/redis-namespace-1.4.1/lib/redis/namespace.rb in multi
        namespaced_block(:multi, &block)
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in block (2 levels) in requeue
              redis.multi do
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in each
          @limiter.jobs.each_with_index do |job,i|
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in each_with_index
          @limiter.jobs.each_with_index do |job,i|
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in block in requeue
          @limiter.jobs.each_with_index do |job,i|
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in lock
          yield
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner.rb in requeue
        @limiter.lock do
/usr/local/rvm/gems/ruby-2.1.1/gems/resque-cleaner-0.3.0/lib/resque_cleaner/server.rb in block (2 levels) in included
            when "retry_and_clear" then cleaner.requeue(true,&block)
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

1 participant