Sha256: e18fec2a63f34f8d39e98f1ca37a3380b8b19cbdfe2361d360ec3e762be2077c

Contents?: true

Size: 1.65 KB

Versions: 2

Compression:

Stored size: 1.65 KB

Contents

# Manages resque-pool.
# Start the process with `initctl start resque-pool`.
description "resque-pool"

start on virtual-filesystems
stop on runlevel [06]

respawn
kill timeout 30
limit nofile 65536 65536

# You may need to set things like PATH here.
env HOME=/home/your_app_user
export HOME

# Ensure no subsequently deployed instances are running after shutdown.
post-stop script
  /usr/bin/pkill -INT -f resque-pool-master
end script

# This script assumes you will deploy new application code by using
# something similar to upstart-reload.conf which runs a second copy of
# the application then shuts down the first when ready to fork.  The
# --lock argument should point to a file that is accessible across
# deploys (i.e. not under a capistrano versioned path).  setuidgid is
# only necessary if you are running an older version of upstart such as
# the one included with RHEL/Centos 6.  In Upstart 1.4 and above you can
# use the setuid and setgid directives instead.
script
  # Assuming you use environment-based configuration.
  source /home/your_app_user/app_env.sh
  cd /your/app_root
  /usr/local/bin/setuidgid your_app_user bundle exec resque-pool \
    --daemon --hot-swap
    # Optionally add:
    # --lock /path/to/your/lock_file \         # default: tmp/resque-pool.lock
    # --config /path/to/resque_pool_config.yml # default: config/resque-pool.yml

  # The above daemon will shutdown if another resque-pool is started using the
  # --kill-others or --hot-swap.  This line will block until all pool instances
  # are terminated, ensuring that upstart doesn't try to restart our process
  # unless it is actually dead.
  flock -x 0 < /path/to/your/lock_file
end script

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque-pool-0.7.1 examples/upstart.conf
resque-pool-0.7.0 examples/upstart.conf