-
-
Notifications
You must be signed in to change notification settings - Fork 288
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
Introduce dispatch event #362
Conversation
c0bdff3
to
03a1e77
Compare
lib/shoryuken/manager.rb
Outdated
@@ -73,6 +73,8 @@ def dispatch_now | |||
return | |||
end | |||
|
|||
fire_event(:dispatch, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Erol false
is the default value for reverse
, I guess you can omit it.
Can you add an expectation in the manager spec for this fire_event
call?
03a1e77
to
3ef721d
Compare
Made the changes requested @phstc. Could you please take a look again? |
@Erol awesome. Added to master 🍻 |
That was fast, thanks! Would you be releasing a new version soon? Would like to bump the version we're using so we can listen for the new event. 🙂 |
Hi @Erol I don't have an ETA for releasing a new version, I usually wait a little longer for adding more stuff. But if nothing shows up soon, I guess I can ship it, but no ETA yet. You may use it from GitHub: gem 'shoryuken', git: 'https://github.com/phstc/shoryuken.git', ref: 'e331d' Usually only requiring from GitHub is fine, since master is usually stable, but the WDYT? |
Yeah that's what I opted to do for now until the next release. Thanks for the ref lock tip! |
hi @Erol I've just released a new version 3.0.7 including your changes! |
This PR introduces a
dispatch
event which fires whenever the dispatcher loop gets called. The possible use case I'm looking at is to monitor uptime and responsiveness of Shoryuken processes by having a callback to ping an instrumentation endpoint.