Class: ForemanRhCloud::HitsUploader

Inherits:
Object
  • Object
show all
Defined in:
app/services/foreman_rh_cloud/hits_uploader.rb

Instance Method Summary collapse

Constructor Details

#initialize(host:, payload:, uuid: nil) ⇒ HitsUploader

Returns a new instance of HitsUploader.



3
4
5
6
7
# File 'app/services/foreman_rh_cloud/hits_uploader.rb', line 3

def initialize(host:, payload:, uuid: nil)
  @host = host
  @uuid = uuid
  @payload = payload
end

Instance Method Details

#upload!Object



9
10
11
12
13
14
15
16
# File 'app/services/foreman_rh_cloud/hits_uploader.rb', line 9

def upload!
  ActiveRecord::Base.transaction do
    update_facets
    update_hits
    update_rules_and_resolutions
    update_details
  end
end