Module: Zold::Farmers

Defined in:
lib/zold/node/farmers.rb

Overview

Farmer

Defined Under Namespace

Classes: Fork, Plain, Spawn

Class Method Summary collapse

Class Method Details

.kill(log, pid, start) ⇒ Object

Kill a process



38
39
40
41
42
43
# File 'lib/zold/node/farmers.rb', line 38

def self.kill(log, pid, start)
  Process.kill('KILL', pid)
  log.debug("Process ##{pid} killed after #{Age.new(start)} of activity")
rescue StandardError => e
  log.debug("No need to kill process ##{pid} since it's dead already: #{e.message}")
end