Sha256: e73341799dd78de1623fc75635b4500de65caf21cda51f6a3793af376c2ca2b5
Contents?: true
Size: 660 Bytes
Versions: 4
Compression:
Stored size: 660 Bytes
Contents
# encoding: utf-8 require "logstash/pipeline_action/base" require "logstash/shutdown_watcher" require "logstash/converge_result" module LogStash module PipelineAction class Stop < Base attr_reader :pipeline_id def initialize(pipeline_id) @pipeline_id = pipeline_id end def execute(agent, pipelines) pipeline = pipelines[pipeline_id] pipeline.shutdown { LogStash::ShutdownWatcher.start(pipeline) } pipelines.delete(pipeline_id) # If we reach this part of the code we have succeeded because # the shutdown call will block. return LogStash::ConvergeResult::SuccessfulAction.new end end end end
Version data entries
4 entries across 4 versions & 1 rubygems