Sha256: 071b814e1e514532238f61265153290541df6254a95b2bafe480cd894144c5b1
Contents?: true
Size: 415 Bytes
Versions: 2
Compression:
Stored size: 415 Bytes
Contents
# frozen_string_literal: true module God module Behaviors class CleanPidFile < Behavior def valid? valid = true valid &= complain("Attribute 'pid_file' must be specified", self) if watch.pid_file.nil? valid end def before_start File.delete(watch.pid_file) 'deleted pid file' rescue 'no pid file to delete' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
resurrected_god-1.1.1 | lib/god/behaviors/clean_pid_file.rb |
resurrected_god-1.1.0 | lib/god/behaviors/clean_pid_file.rb |