module SimplerWorkflow::ParentProcess::ClassMethods
Public Instance Methods
graceful_exit(s)
click to toggle source
# File lib/simpler_workflow/parent_process.rb, line 54 def graceful_exit(s) SimplerWorkflow.child_processes.each do |child| Process.kill(s, child) end end
log_level(val)
click to toggle source
# File lib/simpler_workflow/parent_process.rb, line 64 def log_level(val) @log_level = val end
on_boot() { || ... }
click to toggle source
# File lib/simpler_workflow/parent_process.rb, line 68 def on_boot(&block) $logger.level = @log_level if @log_level # separate this execution in the log $logger.info "Booting with #{@workers} workers----------------------------" @workers.times { yield } # we wait for all children processes to exit; when QUIT is sent # we terminate them and this will automatically exit. Process.waitall end
workers(val)
click to toggle source
# File lib/simpler_workflow/parent_process.rb, line 60 def workers(val) @workers = val end