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

Make usage of the new stop semantics to properly shutdown the plugin #15

Closed
wants to merge 1 commit into from
Closed

Make usage of the new stop semantics to properly shutdown the plugin #15

wants to merge 1 commit into from

Conversation

purbon
Copy link

@purbon purbon commented Sep 14, 2015

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

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

Fixes #14

Depends on Stud::Task being properly setup to finish the task when requested (jordansissel/ruby-stud#26)

@jsvd
Copy link
Member

jsvd commented Sep 18, 2015

doesn't run for me:

  1) LogStash::Inputs::Irc behaves like an interruptible input plugin #stop returns from run
     Failure/Error: expect(plugin_thread).to be_alive
       expected `#<Thread:0x72e34f77 dead>.alive?` to return true, got false
     Shared Example Group: "an interruptible input plugin" called from ./spec/inputs/irc_spec.rb:6
     # /Users/joaoduarte/projects/logstash-devutils/lib/logstash/devutils/rspec/shared_examples.rb:14:in `(root)'
     # /Users/joaoduarte/.rvm/gems/jruby-1.7.19/gems/rspec-wait-0.0.7/lib/rspec/wait.rb:46:in `(root)'

@purbon
Copy link
Author

purbon commented Sep 18, 2015

@jsvd yes! this happen with .22 Stud, but not with .21, working on make it pass again .

@jsvd
Copy link
Member

jsvd commented Sep 18, 2015

#<NameError: uninitialized constant Stud::Task>
org/jruby/RubyModule.java:2726:in `const_missing'
/Users/joaoduarte/all_logstash_plugins/logstash-input-irc/lib/logstash/inputs/irc.rb:91:in `run'
/Users/joaoduarte/projects/logstash-devutils/lib/logstash/devutils/rspec/shared_examples.rb:11:in `(root)'

@purbon
Copy link
Author

purbon commented Sep 18, 2015

@jsvd yeah! just found it now, I guess I was getting stud .21 from logstash-core or anyother place, but not the .22 👍

@purbon
Copy link
Author

purbon commented Sep 18, 2015

@jsvd should work as expected now.

@jsvd
Copy link
Member

jsvd commented Sep 21, 2015

LGTM, can you squash and merge?

Make usage of the new stoppable_sleep and do changes for .22 stud version
@elasticsearch-bot
Copy link

Merged sucessfully into master!

@purbon purbon closed this in e53ca6a Sep 21, 2015
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.

4 participants