-
Notifications
You must be signed in to change notification settings - Fork 6
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 #11
base: main
Are you sure you want to change the base?
Conversation
@@ -47,23 +47,28 @@ def run(queue) | |||
@wmi = WIN32OLE.connect("winmgmts://") | |||
|
|||
begin | |||
@logger.debug("Executing WMI query '#{@query}'") | |||
loop do | |||
while !stop? |
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.
I have a slight preference for until stop?
but to each his own :)
Couldn't test it (no windows box), but LGTM! |
@logger.debug("Executing WMI query '#{@query}'") | ||
loop do | ||
while !stop? | ||
@logger.debug("Executing WMI query '#{@query}'") |
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.
this should use structured logs, not string interpolation:
@logger.debug("Executing WMI query", :query => @query)
@jsvd just replying here as a reminder on this issue |
@jsvd just leaving you another reminder here. |
Implements
stop
to return fromrun
according to elastic/logstash#3210Depends on elastic/logstash-devutils#32 and elastic/logstash#3895
resolves #10