-
-
Save rapind/7eae33272dc28858c583e8440bde1b3c to your computer and use it in GitHub Desktop.
Revisions
-
rapind revised this gist
Dec 1, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -15,7 +15,7 @@ AssertPathExists=/var/www/app Type=simple WorkingDirectory=/var/www/app ExecStart=/bin/bash -lc 'RAILS_ENV=production script/delayed_job restart' KillSignal=SIGINT User=deploy Group=deploy -
Adam Stevenson revised this gist
Sep 13, 2017 . 1 changed file with 10 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,35 +1,33 @@ # Keep delayed job workers running using systemd on ubuntu # Usage # Start "sudo systemctl start delayed_job@{0..3}" to start 4 worker instances # Enable "sudo systemctl enable delayed_job@{0..3}" to enable 4 worker instances # Restart "sudo systemctl restart delayed_job@{0..3}" to restart 4 worker instances # Disable "sudo systemctl disable delayed_job@{0..3}" to disable 4 worker instances # Stop "sudo systemctl stop delayed_job@{0..3}" to stop 4 worker instances [Unit] Description=Delayed Job Worker %i After=syslog.target network.target AssertPathExists=/var/www/app [Service] Type=simple WorkingDirectory=/var/www/app ExecStart=/bin/bash -lc 'RAILS_ENV=production bundle exec rake jobs:work' KillSignal=SIGINT User=deploy Group=deploy UMask=0002 # Restart after 1 minute delay Restart=on-failure RestartSec=60 StandardOutput=syslog StandardError=syslog SyslogIdentifier=dj_worker_%i [Install] WantedBy=multi-user.target -
Adam Stevenson revised this gist
Sep 13, 2017 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ # systemd unit file for Ubuntu 16.04 # Keep delayed job workers running using systemd on ubuntu [Unit] Description=Delayed Job Worker %i After=syslog.target network.target -
Adam Stevenson created this gist
Sep 13, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ # systemd unit file for Ubuntu 16.04 [Unit] Description=Delayed Job Worker %i After=syslog.target network.target # TODO: Change to application directory AssertPathExists=/var/www/rails_app [Service] Type=simple # TODO: Change to application directory WorkingDirectory=/var/www/rails_app ExecStart=/bin/bash -lc 'RAILS_ENV=production bundle exec rake jobs:work' KillSignal=SIGINT User=deploy Group=deploy UMask=0002 Restart=on-failure StandardOutput=syslog StandardError=syslog SyslogIdentifier=dj_worker_%i [Install] WantedBy=multi-user.target # Usage # Start "sudo systemctl start delayed_job@{0..3}" to start 4 worker instances # Enable "sudo systemctl enable delayed_job@{0..3}" to enable 4 worker instances # Disable "sudo systemctl disable delayed_job@{0..3}" to disable 4 worker instances # Stop "sudo systemctl stop delayed_job@{0..3}" to stop 4 worker instances