- Enable dynamic scheduling only if the schedule file exists - Update the sidekiq.yml to include a new job for batch generation - Define a cron schedule for the new job to run every 2 hours This update allows Sidekiq to conditionally enable its scheduler and introduces a new job that processes weather art batches every two hours. The change enhances the job management and scheduling dynamics in the application.
15 lines
229 B
YAML
15 lines
229 B
YAML
|
|
:concurrency: 5
|
|
:queues:
|
|
- prod
|
|
- default
|
|
- mailers
|
|
- low
|
|
|
|
:scheduler:
|
|
:schedule:
|
|
batch_generate_weather:
|
|
cron: '0 */2 * * *' # every 每2 hours
|
|
queue: prod
|
|
class: BatchGenerateWeatherArtsWorker
|