-
Notifications
You must be signed in to change notification settings - Fork 12
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
use plugin.stop to return from run #7
Conversation
It would also be helpful to handle this stop when Stud.interval get in a proper shutdown mechanism with wake up, isn't? |
@purbon plugin now properly aborts the stud interval 👍 |
LGTM |
@@ -67,4 +68,8 @@ def generate_message(sequence) | |||
end | |||
end | |||
|
|||
def stop | |||
super |
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.
no need for super anymore, right?
6216ef4
to
955fef5
Compare
another review is needed for this, removed super |
This is much prettier! LGTM |
Merged sucessfully into master! |
Implements
stop
to return fromrun
according to elastic/logstash#3210Depends on elastic/logstash-devutils#32 and elastic/logstash#3812
This implementation still has a problem that, during the hearbeat sleep, there is no way to abort the plugin
run
method. Therefore a very biginterval_time
can make this plugin hang the shutdown sequenceMaybe an option is to decide to do a Thread.kill if the thread is sleeping?
resolves #8