Sha256: e3bea13db4eb48357c407f1793c417e750459374fd162d7006321d59ac35e1c4

Contents?: true

Size: 1.65 KB

Versions: 11

Compression:

Stored size: 1.65 KB

Contents

[Unit]
Description=resque
# consider adding redis-server.service if Redis is local and systemd-managed.
After=syslog.target network.target

# See these pages for lots of options:
#
#   https://www.freedesktop.org/software/systemd/man/systemd.service.html
#   https://www.freedesktop.org/software/systemd/man/systemd.exec.html
#
# THOSE PAGES ARE CRITICAL FOR ANY LINUX DEVOPS WORK; read them multiple
# times! systemd is a critical tool for all developers to know and understand.
#
[Service]
#
#      !!!!  !!!!  !!!!
#
Type=forking

WorkingDirectory=/u/apps/{{project_name}}/current

ExecStart=/usr/local/bin/bundle exec rake resque:work
ExecStop=/bin/kill -s QUIT $MAINPID
PIDFile=/u/apps/{{project_name}}/shared/tmp/pids/resque.pid

# Uncomment this if you are going to use this as a system service
# if using as a user service then leave commented out, or you will get an error trying to start the service
# !!! Change this to your deploy user account if you are using this as a system service !!!
User=deploy
Group=deploy
UMask=0002

# Greatly reduce Ruby memory fragmentation and heap usage
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/
Environment=MALLOC_ARENA_MAX=2
Environment=RAILS_ENV={{rails_env}}
Environment=COUNT=1
Environment=QUEUES={{ job_queues | join(',') }}
Environment=BACKGROUND=yes
Environment=PIDFILE=/u/apps/{{project_name}}/shared/tmp/pids/resque.pid

# if we crash, restart
RestartSec=1
Restart=on-failure

# output goes to /var/log/syslog (Ubuntu) or /var/log/messages (CentOS)
StandardOutput=syslog
StandardError=syslog

# This will default to "bundler" if we don't specify it
SyslogIdentifier=resque

[Install]
WantedBy=multi-user.target

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
subspace-3.0.12 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.11 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.10 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.9 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.6 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.5 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.4 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.3 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.2 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.0 ansible/roles/resque/templates/resque-systemd.service
subspace-3.0.0.rc1 ansible/roles/resque/templates/resque-systemd.service