Skip to content

Allow subclasses to inherit more resque-retry configuration #129

Description

@branliu0

At work, we are using a ResqueBase class that all of our Resque jobs derive from. It would be great to be able to configure some resque-retry information there, so that we can have "defaults" that all of our resque jobs automatically inherit, but can override if desired.

Either (A) we automatically inherit more resque-retry options (but I think this is a bit of a breaking change). Or (B) we add the ability for the user to specify which options should be inherited. e.g.,

class InheritingJob
  extend Resque::Plugins::Retry

  @retry_exceptions = [MyException]
  @inherited_options = [:retry_exceptions]
end

What do you think? If it sounds reasonable the implementation is pretty straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions