Skip to content

Commit

Permalink
Merge pull request #14807 from isimluk/cb-container-performance-memory
Browse files Browse the repository at this point in the history
Do not store whole container env. in the reporting worker forever
(cherry picked from commit 45ac9b6)

https://bugzilla.redhat.com/show_bug.cgi?id=1444052
  • Loading branch information
gtanzillo authored and simaishi committed Apr 26, 2017
1 parent d1ccf5c commit 1ea0161
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/chargeback_container_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def self.build_results_for_report_ChargebackContainerImage(options)
@unknown_project ||= OpenStruct.new(:id => 0, :name => _('Unknown Project'), :ems_ref => _('Unknown'))
@unknown_image ||= OpenStruct.new(:id => 0, :full_name => _('Unknown Image'))
build_results_for_report_chargeback(options)
ensure
@data_index = @containers = nil
end

def self.default_key(metric_rollup_record, ts_key)
Expand Down
2 changes: 2 additions & 0 deletions app/models/chargeback_container_project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def self.build_results_for_report_ChargebackContainerProject(options)
return [[]] if @projects.empty?

build_results_for_report_chargeback(options)
ensure
@projects = nil
end

def self.where_clause(records, _options)
Expand Down

0 comments on commit 1ea0161

Please sign in to comment.