Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EUWE] Introduce report result purging timer #13429

Merged
merged 1 commit into from
Jan 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/models/miq_schedule_worker/jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ def policy_event_purge_timer
queue_work(:class_name => "PolicyEvent", :method_name => "purge_timer", :zone => nil)
end

def miq_report_result_purge_timer
queue_work(:class_name => "MiqReportResult", :method_name => "purge_timer", :zone => nil)
end

def storage_refresh_metrics
queue_work(
:class_name => "StorageManager",
Expand Down
6 changes: 6 additions & 0 deletions app/models/miq_schedule_worker/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ def schedules_for_scheduler_role
enqueue :miq_alert_evaluate_hourly_timer
end

# Schedule - Prune old reports Timer
every = worker_settings[:report_result_purge_interval]
scheduler.schedule_every(every, :first_in => every) do
enqueue :miq_report_result_purge_timer
end

# Schedule every 24 hours
at = worker_setting_or_default(:storage_file_collection_time_utc)
if Time.now.strftime("%Y-%m-%d #{at}").to_time(:utc) < Time.now.utc
Expand Down
1 change: 1 addition & 0 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1365,6 +1365,7 @@
:performance_rollup_purging_start_delay: 5.minutes
:policy_events_purge_interval: 1.day
:poll: 15.seconds
:report_result_purge_interval: 1.week
:server_log_stats_interval: 5.minutes
:server_stats_interval: 60.seconds
:service_retired_interval: 10.minutes
Expand Down