diff --git a/app/models/miq_schedule_worker/jobs.rb b/app/models/miq_schedule_worker/jobs.rb index a62e1f4122a8..00536e20f818 100644 --- a/app/models/miq_schedule_worker/jobs.rb +++ b/app/models/miq_schedule_worker/jobs.rb @@ -115,6 +115,10 @@ def binary_blob_purge_timer queue_work(:class_name => "BinaryBlob", :method_name => "purge_timer", :zone => nil) end + def vim_performance_states_purge_timer + queue_work(:class_name => "VimPerformanceState", :method_name => "purge_timer", :zone => nil) + end + def miq_schedule_queue_scheduled_work(schedule_id, rufus_job) MiqSchedule.queue_scheduled_work(schedule_id, rufus_job.job_id, rufus_job.next_time.to_i, rufus_job.opts) end diff --git a/app/models/miq_schedule_worker/runner.rb b/app/models/miq_schedule_worker/runner.rb index bd7f2e1b4d0b..2ee4fc5db6c2 100644 --- a/app/models/miq_schedule_worker/runner.rb +++ b/app/models/miq_schedule_worker/runner.rb @@ -204,6 +204,11 @@ def schedules_for_scheduler_role enqueue(:binary_blob_purge_timer) end + every = worker_settings[:vim_performance_states_purge_interval] + scheduler.schedule_every(every, :first_in => every) do + enqueue(:vim_performance_states_purge_timer) + end + # Schedule every 24 hours at = worker_settings[:storage_file_collection_time_utc] if Time.now.strftime("%Y-%m-%d #{at}").to_time(:utc) < Time.now.utc diff --git a/config/settings.yml b/config/settings.yml index b9252f7dedab..d82f659c924f 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -1203,6 +1203,7 @@ :storage_file_collection_interval: 1.days :storage_file_collection_time_utc: 21600 :task_timeout_check_frequency: 1.hour + :vim_performance_states_purge_interval: 1.day :vm_retired_interval: 10.minutes :yum_update_check: 12.hours :ui_worker: