Class: Renalware::Reporting::RefreshAuditDataJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/renalware/reporting/refresh_audit_data_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(audit) ⇒ Object

:reek:UtilityFunction



12
13
14
15
16
17
18
19
# File 'app/jobs/renalware/reporting/refresh_audit_data_job.rb', line 12

def perform(audit)
  if audit.materialized?
    refresh_materialized_view_associated_with_audit(audit)
    update_audit_refreshment_date(audit)
  else
    Rails.logger.warn("Cannot refresh an view that is not materialized: #{audit.view_name}")
  end
end