mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-31 22:53:14 +02:00
Merge branch 'master' of github.com:plashchynski/crono
This commit is contained in:
@@ -50,6 +50,7 @@ module Crono
|
||||
end
|
||||
|
||||
def write_pid
|
||||
return unless config.pidfile
|
||||
pidfile = File.expand_path(config.pidfile)
|
||||
File.write(pidfile, ::Process.pid)
|
||||
end
|
||||
|
||||
@@ -10,9 +10,12 @@ module Crono
|
||||
def initialize
|
||||
self.cronotab = CRONOTAB
|
||||
self.logfile = LOGFILE
|
||||
self.pidfile = PIDFILE
|
||||
self.daemonize = false
|
||||
self.environment = ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
|
||||
end
|
||||
|
||||
def pidfile
|
||||
@pidfile || (daemonize ? PIDFILE : nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user