Skip to content

Instantly share code, notes, and snippets.

@itsprdp
Created March 26, 2015 11:42
Show Gist options
  • Save itsprdp/bc235439d7a787dba4c9 to your computer and use it in GitHub Desktop.
Save itsprdp/bc235439d7a787dba4c9 to your computer and use it in GitHub Desktop.
# Systemd service for delayed_job. File path: etc/systemd/system/delayed_job.service
[Unit]
Description=Delayed Job - Database based asynchronous priority queue system
[Service]
Type=forking
PIDFile=/home/<%= fetch(:user) %>/<%= fetch(:application) %>/current/tmp/pids/delayed_job.pid
ExecStartPre=/bin/rm -f /home/<%= fetch(:user) %>/<%= fetch(:application) %>/current/tmp/pids/delayed_job.pid
ExecStart=/etc/init.d/delayed_job start
Restart=always
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment