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

use plugin.stop to return from run #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jsvd
Copy link
Member

@jsvd jsvd commented Sep 18, 2015

Implements stop to return from run according to elastic/logstash#3210

Depends on elastic/logstash-devutils#32 and elastic/logstash#3895

resolves #10

@@ -47,23 +47,28 @@ def run(queue)
@wmi = WIN32OLE.connect("winmgmts://")

begin
@logger.debug("Executing WMI query '#{@query}'")
loop do
while !stop?

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 :)

@andrewvc
Copy link

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}'")
Copy link
Contributor

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)

@andrewvc
Copy link

andrewvc commented Dec 3, 2015

@jsvd just replying here as a reminder on this issue

@andrewvc
Copy link

@jsvd just leaving you another reminder here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor shutdown sequence to use plugin.stop
4 participants