Sha256: 931caa3e76c18bb52d9a51065f24ce2a57415531c17b607f113e2720fed7fc46
Contents?: true
Size: 708 Bytes
Versions: 12
Compression:
Stored size: 708 Bytes
Contents
# encoding: utf-8 require "logstash/pipeline_action/base" module LogStash module PipelineAction class Stop < Base attr_reader :pipeline_id def initialize(pipeline_id) @pipeline_id = pipeline_id end def execute(agent, pipelines) pipelines.compute(pipeline_id) do |_,pipeline| pipeline.shutdown { LogStash::ShutdownWatcher.start(pipeline) } pipeline.thread.join nil # delete the pipeline end # If we reach this part of the code we have succeeded because # the shutdown call will block. return LogStash::ConvergeResult::SuccessfulAction.new end def to_s "PipelineAction::Stop<#{pipeline_id}>" end end end end
Version data entries
12 entries across 12 versions & 1 rubygems