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

Allow job classes to define retryable exceptions #29

Closed
myronmarston opened this issue May 24, 2012 · 3 comments · Fixed by #63
Closed

Allow job classes to define retryable exceptions #29

myronmarston opened this issue May 24, 2012 · 3 comments · Fixed by #63
Assignees

Comments

@myronmarston
Copy link
Contributor

Currently, the ruby worker fails all exceptions. However, there are certain types of errors (e.g. transient network failures) that we expect, and that we'd like it to automatically retry. Here's a suggested API for that:

class MyJob
  extend Qless::RetryExceptions(TimeoutError, SomeOtherError)

  def self.perform(data)
  end
end
@proby
Copy link
Contributor

proby commented May 25, 2012

+1

@ghost ghost assigned bkirz Dec 14, 2012
@bkirz
Copy link
Contributor

bkirz commented Dec 14, 2012

As per our earlier conversation, the method disguised as a class name is a bit misleading. I'll go with the following API:

class MyJob
  extend Qless:RetryExceptions
  retry_on TimeoutError, SomeOtherError

  def self.perform(job)
    #...
  end
end

@bkirz
Copy link
Contributor

bkirz commented Feb 1, 2013

Closed by #63

@bkirz bkirz closed this as completed Feb 1, 2013
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

Successfully merging a pull request may close this issue.

3 participants