Sha256: e9697313ee44f8e463f1565d2ba4d427ce3fae12fb821faaed26247d905ea6e3
Contents?: true
Size: 1.84 KB
Versions: 61
Compression:
Stored size: 1.84 KB
Contents
<% @path = "/etc/init/resque-pool.conf" @backup = false %> description "resque pool server" start on started redis stop on runlevel [016] # not available in upstart 0.6.5 # kill signal INT script cd <%= Rubber.root %> exec sudo -u <%= rubber_env.app_user %> /bin/bash -l -c 'cd <%= Rubber.root %> && exec bundle exec resque-pool >> log/resque-pool.log 2>&1' end script post-start script status resque-pool | head -n1 | awk '{print $NF}' > <%= rubber_env.resque_pool_pid_file %> end script # using pre-stop prevents restarts in upstart on ubuntu 10.04, # but no choice since "kill signal" not available in that ver # of upstart, and we need to kill INT on restart during deploy # so that we dont end up killing running jobs # pre-stop script pid=`cat <%= rubber_env.resque_pool_pid_file %>` kill -INT $pid while ps -p $pid > /dev/null; do sleep 0.1; done rm -f <%= rubber_env.resque_pool_pid_file %> end script # The pool manager responds to the following signals: # # HUP - reload the config file, reload logfiles, restart all workers. # QUIT - send QUIT to each worker parent and shutdown the manager after all workers are done. # INT - send QUIT to each worker parent and immediately shutdown manager # TERM - send TERM to each worker parent and immediately shutdown manager # WINCH - send QUIT to each worker, but keep manager running (send HUP to reload config and restart workers) # USR1/USR2/CONT - pass the signal on to all worker parents (see Resque docs). # Use HUP to help logrotate run smoothly and to change the number of workers per worker type. # # Resque workers respond to a few different signals: # # QUIT - Wait for child to finish processing then exit # TERM / INT - Immediately kill child then exit # USR1 - Immediately kill child but don't exit # USR2 - Don't start to process any new jobs # CONT - Start to process new jobs again after a USR2
Version data entries
61 entries across 61 versions & 1 rubygems