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

refactor shutdown sequence to use plugin.stop #3

Open
Tracked by #3963
jsvd opened this issue Sep 11, 2015 · 3 comments
Open
Tracked by #3963

refactor shutdown sequence to use plugin.stop #3

jsvd opened this issue Sep 11, 2015 · 3 comments

Comments

@jsvd
Copy link
Member

jsvd commented Sep 11, 2015

Change shutdown sequence to be triggered by plugin.stop instead of ShutdownSignal exception.
Also remove any calls to: shutdown, finished, finished?, running? or terminating?
This depends on elastic/logstash#3895

@russorat
Copy link

@jsvd if i understand the linked ticket correctly, since this plugin doesn't have a shutdown function and does not catch any ShutdownSignal exceptions, there really isn't anything to refactor? Am i missing something?

@jsvd
Copy link
Member Author

jsvd commented Sep 24, 2015

bad side of leaving as it is, is that if the query + data processing takes a while, logstash won't exit until the task is finished.

So you can decide, for example, that the plugin should check if it's time to shutdown after processing each event from the query, and abort if so. You can do this by placing a return if stop? after pushing an event to the queue, for example. Obviously this means that whatever system you're sending data to will have partial data.

@russorat
Copy link

good points. i will update.

On Thu, Sep 24, 2015 at 2:43 PM, João Duarte [email protected]
wrote:

bad side of leaving as it is, is that if the query + data processing takes
a while, logstash won't exit until the task is finished.

So you can decide, for example, that the plugin should check if it's time
to shutdown after processing each event from the query, and abort if so.
You can do this by placing a return if stop? after pushing an event to
the queue, for example. Obviously this means that whatever system you're
sending data to will have partial data.


Reply to this email directly or view it on GitHub
#3 (comment)
.

@russorat russorat removed their assignment Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants