Open jsvd opened 8 years ago
@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?
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.
good points. i will update.
On Thu, Sep 24, 2015 at 2:43 PM, João Duarte notifications@github.com 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 https://github.com/logstash-plugins/logstash-input-salesforce/issues/3#issuecomment-143058549 .
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 https://github.com/elastic/logstash/pull/3895