Class: Services::MdsPull

Inherits:
ServiceImplementation show all
Defined in:
app/models/services/mds_pull.rb

Direct Known Subclasses

PccMdsPull, SltcMdsPull

Constant Summary collapse

ASYNC_SEND_OPTS =

The async configuration options

{
  :priority => 100, # Pretty high priority; higher than MDS for sure
  :time_to_run => 3600 # GIve it an hour
}

Instance Attribute Summary

Attributes inherited from ServiceImplementation

#service_definition

Instance Method Summary collapse

Methods inherited from ServiceImplementation

#account_map, #initialize, #server_credentials

Constructor Details

This class inherits a constructor from Services::ServiceImplementation

Instance Method Details

#identify_providers(configured_account) ⇒ Object



31
32
33
# File 'app/models/services/mds_pull.rb', line 31

def identify_providers()
  # Do nothing by default. Only some service providers will provide this feature.
end

#invokeObject

Main (only public) entry point for the MDS pull service.



16
17
18
19
20
21
22
23
24
25
# File 'app/models/services/mds_pull.rb', line 16

def invoke

  service_definition.configured_accounts.enabled.each do |  |

     = MdsPullAccount.create!(configured_account: )

    .ayl_send_opts(:process, ASYNC_SEND_OPTS)

  end
end

#request_assessments(configured_account) ⇒ Object



35
36
37
# File 'app/models/services/mds_pull.rb', line 35

def request_assessments()
  # Do nothing by default. Only some service providers will provide this feature.
end

#request_baseline(configured_account, provider_id, uploaded_after, uploaded_before) ⇒ Object



27
28
29
# File 'app/models/services/mds_pull.rb', line 27

def request_baseline(, provider_id, uploaded_after, uploaded_before)
  # Do nothing by default; the derived class will handle the necessary details.
end