Skip to content

Commit

Permalink
Log archived targets during C&U collection
Browse files Browse the repository at this point in the history
Instead of raising exception due to missing ems_id.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1560691
  • Loading branch information
slemrmartin committed Jul 26, 2018
1 parent 6772448 commit 98562b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/models/metric/ci_mixin/capture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def perf_capture(interval_name, start_time = nil, end_time = nil)
end
raise ArgumentError, _("end_time cannot be specified if start_time is nil") if start_time.nil? && !end_time.nil?

# if target (== self) is archived, skip it
if respond_to?(:ems_id) && ems_id.nil?
_log.warn("C&U collection's target is archived (no EMS associated), skipping. Target: #{log_target}")
return
end

start_time, end_time = fix_capture_start_end_time(interval_name, start_time, end_time)
start_range, end_range, counters_data = just_perf_capture(interval_name, start_time, end_time)

Expand Down

0 comments on commit 98562b4

Please sign in to comment.