From d6bf5b53de0ea899ed6a3d7d41e5f2b86ea36a2c Mon Sep 17 00:00:00 2001 From: d-m-u Date: Wed, 14 Aug 2019 16:35:17 -0400 Subject: [PATCH] schedule_every needs :first_in for tagging to work properly --- app/models/miq_schedule_worker/runner.rb | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/models/miq_schedule_worker/runner.rb b/app/models/miq_schedule_worker/runner.rb index 66e51e603b2..b63a240dd50 100644 --- a/app/models/miq_schedule_worker/runner.rb +++ b/app/models/miq_schedule_worker/runner.rb @@ -77,15 +77,19 @@ def schedules_for_all_roles # Schedule - Log current system configuration every = worker_settings[:log_active_configuration_interval] - scheduler.schedule_every(every, :tags => [:vmdb_appliance_log_config, schedule_category]) do - enqueue(:vmdb_appliance_log_config) - end + scheduler.schedule_every( + every, + :first_in => every, + :tags => [:vmdb_appliance_log_config, schedule_category] + ) { enqueue(:vmdb_appliance_log_config) } # Schedule - Log current database statistics and bloat every = worker_settings[:log_database_statistics_interval] - scheduler.schedule_every(every, :tags => [:log_all_database_statistics, schedule_category]) do - enqueue(:vmdb_database_log_all_database_statistics) - end + scheduler.schedule_every( + every, + :first_in => every, + :tags => [:log_all_database_statistics, schedule_category] + ) { enqueue(:vmdb_database_log_all_database_statistics) } # Schedule - Update Server Statistics every = worker_settings[:server_stats_interval]