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

Preserves parent worker class options #451

Merged
merged 1 commit into from
Dec 31, 2017

Conversation

fabiokr
Copy link
Contributor

@fabiokr fabiokr commented Dec 29, 2017

Relates to #450

Uses a shoryuken_class_attribute implementation that preserves parent
worker class options and allow child classes to override those.

Example:

class ParentWorker
  include ShoryukenWorker

  shoryuken_options queue: "myqueue", auto_delete: true
end

class ChildWorker < ParentWorker
  shoryuken_options auto_delete: false
end

In this example, the ChildWorker will carry on the parent options, and
override the auto_delete configuration.

@fabiokr fabiokr force-pushed the feature/class-options branch 2 times, most recently from 9dab652 to d216cf4 Compare December 29, 2017 12:43
Uses a `shoryuken_class_attribute` implementation that preserves parent
worker class options and allow child classes to override those.

Example:

```
class ParentWorker
  include ShoryukenWorker

  shoryuken_options queue: "myqueue", auto_delete: true
end

class ChildWorker < ParentWorker
  shoryuken_options auto_delete: false
end
```

In this example, the ChildWorker will carry on the parent options, and
override the `auto_delete` configuration.
@fabiokr
Copy link
Contributor Author

fabiokr commented Dec 29, 2017

cc/ @phstc

@fabiokr
Copy link
Contributor Author

fabiokr commented Dec 29, 2017

@phstc CodeClimate is complaining about the shoryuken_class_attribute implementation, but I tried to avoid changing that as it is basically the same implementation as sidekiq and activesupport. Thoughts?

@phstc phstc merged commit 4ebc09d into ruby-shoryuken:master Dec 31, 2017
@phstc
Copy link
Collaborator

phstc commented Dec 31, 2017

Muito obrigado @fabiokr e @newx 🍻

Added to master!

I'm planning to release a new version next week, I will update you both when it's out.

@phstc
Copy link
Collaborator

phstc commented Jan 3, 2018

@fabiokr @newx 3.2.0 is out with this change! 🍻

@fabiokr
Copy link
Contributor Author

fabiokr commented Jan 3, 2018

@phstc Awesome, thanks!

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 this pull request may close these issues.

3 participants