group 'delayed-jobs' do chain grace: 10.seconds start_timeout <%= options[:start_timeout] %>.seconds stop_timeout <%= options[:stop_timeout] %>.seconds restart_timeout <%= options[:restart_timeout] %>.seconds start_grace <%= options[:start_grace] %>.seconds stop_grace <%= options[:stop_grace] %>.seconds restart_grace <%= options[:restart_grace] %>.seconds workers_count = <%= options[:workers] %> (0 ... workers_count).each do |i| process "worker-#{i}" do pid_file "tmp/pids/delayed_job.#{i}.pid" start_command "<%= options[:start_command] %>" stop_command "<%= options[:stop_command] %>" end end end