Запуск фоновых задач с Capistrano

TimeSpan несомненно может сохранить время дня - просто необходимо рассматривать значение, поскольку количество времени протекло с полуночи, в основном тот же способ, которым мы читаем часы.

19
задан Georg Ledermann 10 July 2009 в 12:38
поделиться

1 ответ

Do you want your Scheduler job to run continually in the background and get restarted when you run Capistrano?

If so, then for that I use runit http://smarden.sunsite.dk/runit/ and DelayedJob http://github.com/Shopify/delayed_job/tree/master

  1. Install runit in the mode of not replacing init
  2. Add your background job as a runit service and add the log monitor for it from runit.
  3. Have Capistrano call sudo sv kill job_name to kill and restart the job.

My backround job is an instance of the Rails plugin DelayedJob which handles background Rails tasks. I kill it with every Capistrano deploy so it will restart with the updated code base.

This has proved to be very reliable.

HTH,

Larry

1
ответ дан 30 November 2019 в 04:29
поделиться
Другие вопросы по тегам:

Похожие вопросы: