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

Problem working with resque-retry #120

Open
rdssoni opened this issue Dec 9, 2014 · 4 comments
Open

Problem working with resque-retry #120

rdssoni opened this issue Dec 9, 2014 · 4 comments

Comments

@rdssoni
Copy link

rdssoni commented Dec 9, 2014

Delayed retrying with "resque-retry" gem is not working in a Job class which has "resque-status" integrated.
Retrying jobs without delay is working fine i.e. if i only specify the option @retry_limit = <no. of retries>, then it retries that many times.
But if i specify @retry_delay = <delay_in_seconds> OR use Exponential backoff like @backoff_strategy = [0, 60, 600, 3600, 10800, 21600], then it does not even retry the Job at all.

I am currently looking into this. Will let you know if i have a fix for this.

@stevenjackson
Copy link

I'm seeing this as well, it appears that the resque-status uuid that resque-retry passes back via resque-scheduler causes the enqueue_to call to fail (splatting the args causes an ArgumentError).

@stevenjackson
Copy link

Here's my hack, I don't think it's a good enough solution to submit a pull request

    #override because resque-retry passes in resque-status uuid as the first arg
    def self.scheduled(queue, klass, *args)
      if args.size == 2
        uuid, options = args
        Resque.enqueue_to(queue, klass, uuid, options)
        uuid
      else
        self.enqueue_to(queue, self, *args)
      end
    end

@rdssoni
Copy link
Author

rdssoni commented Dec 16, 2014

This is almost the type of hack i used in my system (with a little modification though). See this:

def self.scheduled(queue, klass, *args)
  if args.is_a?(Hash) || args.is_a?(ActiveSupport::HashWithIndifferentAccess)
    self.enqueue_to(queue, self, *args)
  else
    uuid, options = args
    Resque.enqueue_to(queue, klass, uuid, options)
    uuid
  end
end

I am also looking into a solution which could turn into a pull request.

@hlakshmi
Copy link

hlakshmi commented Feb 1, 2021

self.scheduled

@stevenjackson Quick question, when the job gets retried by resque-retry does the status which is tracked by resque-status get updated automatically to pending back from failed in redis?

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

3 participants