Class: NcsNavigator::Warehouse::Hooks::EtlStatusEmail
- Inherits:
-
Object
- Object
- NcsNavigator::Warehouse::Hooks::EtlStatusEmail
- Defined in:
- lib/ncs_navigator/warehouse/hooks/etl_status_email.rb
Overview
A post-ETL hook which sends a message to configured e-mail accounts after each ETL run. The message indicates whether the ETL succeeded or failed and some summary statistics, but no further detail.
Instance Method Summary collapse
- #etl_failed(args)
- #etl_succeeded(args)
-
#initialize(options = {}) ⇒ EtlStatusEmail
constructor
A new instance of EtlStatusEmail.
Constructor Details
#initialize(options = {}) ⇒ EtlStatusEmail
Returns a new instance of EtlStatusEmail.
16 17 18 |
# File 'lib/ncs_navigator/warehouse/hooks/etl_status_email.rb', line 16 def initialize(={}) @to = [:to] or 'Need at least one recipient' end |
Instance Method Details
#etl_failed(args)
This method returns an undefined value.
34 35 36 37 38 |
# File 'lib/ncs_navigator/warehouse/hooks/etl_status_email.rb', line 34 def etl_failed(args) args[:configuration].set_up_action_mailer Mailer.(@to, args[:transform_statuses]).deliver end |
#etl_succeeded(args)
This method returns an undefined value.
24 25 26 27 28 |
# File 'lib/ncs_navigator/warehouse/hooks/etl_status_email.rb', line 24 def etl_succeeded(args) args[:configuration].set_up_action_mailer Mailer.(@to, args[:transform_statuses]).deliver end |