y-ken / fluent-plugin-twitter

Fluentd Input/Output plugin to process tweets with Twitter Streaming API.
https://rubygems.org/gems/fluent-plugin-twitter
Other
52 stars 27 forks source link

Avoid NoMethodError while shutdown sequence #42

Closed okkez closed 7 years ago

okkez commented 7 years ago

We cannot shutdown Twitter::Streaming::Client gracefully. Because Ruby's OpenSSL binding does not support SSL_shutdown.

https://bugs.ruby-lang.org/issues/6133

See #41

okkez commented 7 years ago

After merge this PR. Shutdown by Ctrl-c:

2017-04-03 14:50:49 +0900 [info]: Received graceful stop
2017-04-03 14:50:50 +0900 [info]: shutting down fluentd
2017-04-03 14:50:50 +0900 [info]: preparing shutdown input plugin type=:twitter plugin_id="object:2aaae206388c"
2017-04-03 14:50:50 +0900 [info]: preparing shutdown output plugin type=:stdout plugin_id="object:2aaae1a8cd8c"
2017-04-03 14:50:50 +0900 [info]: shutting down input plugin type=:twitter plugin_id="object:2aaae206388c"
2017-04-03 14:50:50 +0900 [info]: shutting down output plugin type=:stdout plugin_id="object:2aaae1a8cd8c"
2017-04-03 14:50:50 +0900 [info]: closing input plugin type=:twitter plugin_id="object:2aaae206388c"
2017-04-03 14:50:51 +0900 [info]: closing output plugin type=:stdout plugin_id="object:2aaae1a8cd8c"
2017-04-03 14:50:51 +0900 [warn]: killing existing thread thread=#<Thread:0x005555c45885f8@/home/kenji/ruby/td-family/fluentd/lib/fluent/plugin_helper/thread.rb:58 sleep>
2017-04-03 14:50:51 +0900 [warn]: thread doesn't exit correctly (killed or other reason) plugin=Fluent::Plugin::TwitterInput title=:in_twitter thread=#<Thread:0x005555c45885f8@/home/kenji/ruby/td-family/fluentd/lib/fluent/plugin_helper/thread.rb:58 aborting> error=nil
2017-04-03 14:50:51 +0900 [info]: Worker 0 finished with status 0
y-ken commented 7 years ago

Great. Thank you.

y-ken commented 7 years ago

I'll release new version.

y-ken commented 7 years ago

I have released v0.6.1