Sha256: b42658c2e94bfcb24f7a7042f4e9272e8de8e85a62a3b6a35e4765e1ff70ac11
Contents?: true
Size: 613 Bytes
Versions: 13
Compression:
Stored size: 613 Bytes
Contents
class Loops::Commands::StartCommand < Loops::Command def execute # Pid file check if Loops::Daemonize.check_pid(Loops.pid_file) puts "Can't start, another process exists!" exit(1) end # Daemonization if options[:daemonize] app_name = "loops monitor: #{options[:args].join(' ') rescue 'all'}\0" Loops::Daemonize.daemonize(app_name) end # Pid file creation Loops::Daemonize.create_pid(Loops.pid_file) # Workers processing engine.start_loops!(options[:args]) # Workers exited, cleaning up File.delete(Loops.pid_file) rescue nil end end
Version data entries
13 entries across 13 versions & 2 rubygems