Skip to content

"Duplicate strategy name" warning for worker superclass #26

Open
@mahemoff

Description

@mahemoff

Seeing a "Duplicate strategy name" error when putting throttle rules in a worker superclass.

/rubies/ruby-2.3.1/lib/ruby/gems/2.3.02.3.0/gems/sidekiq-throttled-0.6.6/lib/sidekiq/throttled/registry.rb:23

I believe this happens when 2 or more worker classes are inheriting from a superclass with throttle. I'd like to keep things DRY with a single declaration of the throttle. In my case, I don't particularly care if the throttle applies separately to each subclass or it's "global" for everything in the hierarchy (as happens now I think, because they are keyed on the superclass name). Either way would be fine as long as it's well-defined and there's no warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bughelp wantedContributions are highly appreciated

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions