Sha256: 4689e0437cabeba24a959b16fa5516a1240d6ae44924b75211207abab04e717e
Contents?: true
Size: 927 Bytes
Versions: 6
Compression:
Stored size: 927 Bytes
Contents
# -*- coding: utf-8 -*- require 'tengine/job' # 終了対象となりうるVertexで使用するモジュール module Tengine::Job::Killing extend ActiveSupport::Concern included do require 'tengine/core' include Tengine::Core::CollectionAccessible field :killing_signals, :type => Array # 強制停止時にプロセスに送るシグナルの配列 array_text_accessor :killing_signals field :killing_signal_interval, :type => Integer # 強制停止時にkilling_signalsで定義されるシグナルを順次送信する間隔。 end DEFAULT_KILLING_SIGNAL_INTERVAL = 5 def actual_killing_signals killing_signals ? killing_signals : (parent ? parent.actual_killing_signals : ['KILL']) end def actual_killing_signal_interval killing_signals ? killing_signal_interval : (parent ? parent.actual_killing_signal_interval : DEFAULT_KILLING_SIGNAL_INTERVAL) end end
Version data entries
6 entries across 6 versions & 1 rubygems