delayed jobまとめ
2021/07/14
開発環境での起動
rails jobs:work
本番環境での起動
RAILS_ENV=production bundle exec bin/delayed_job -n1 start
・停止
RAILS_ENV=production bundle exec bin/delayed_job -n1 stop
・再起動
RAILS_ENV=production bundle exec bin/delayed_job -n1 restart
・3台ワーカーを起動させたい時
RAILS_ENV=production bundle exec bin/delayed_job -n3 start
・workerが起動状況確認
ps aux | grep -v grep | grep delay
以下の記事を参考に死活管理、再起動までやるのが吉