Allow job classes to define retryable exceptions #29

Closed
myronmarston opened this Issue May 24, 2012 · 3 comments

Comments

Projects
None yet
3 participants
Owner

myronmarston commented May 24, 2012

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
Contributor

proby commented May 25, 2012

+1

benkirzhner was assigned Dec 14, 2012

Member

benkirzhner 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
Member

benkirzhner commented Feb 1, 2013

Closed by #63

benkirzhner closed this Feb 1, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment