В моем проекте более 250 заданий cron настроены через гем sidekiq-scheduler (https://github.com/moove-it/sidekiq-scheduler), и все они выполняются каждые 2 часа, но я хочу выполнить все синхронно или сказать одна работа за другой. Ниже приведена моя настройка файла sidekiq.yml,
:schedule:
cron1:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron1'
cron2:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron2'
cron3:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron3'
cron4:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron4'
cron5:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron5
:
:
:
cron250:
cron: '0 */2 * * *'
class: Jobs::StartNew
queue: low
args:
description: 'This job executes the cron250
Есть опция :resolution
, которую я нашел из https://www.rubydoc.info/gems/sidekiq-scheduler/0.4.1, но не уверен, что это время ожидания после каждого выполнения cronjob.
Может ли кто-нибудь помочь мне управлять заданиями cron, выполняемыми один за другим, но в то же время. и поэтому он не загружается в память сервера.