Class | Backup::Notifier::Base |
In: |
lib/backup/notifier/base.rb
|
Parent: | Object |
on_success | -> | notify_on_success? |
on_warning | -> | notify_on_warning? |
on_failure | -> | notify_on_failure? |
on_failure | [RW] | When set to true, the user will be notified by email when a backup process raises an exception before finishing |
on_success | [RW] | When set to true, the user will be notified by email when a backup process ends without raising any exceptions |
on_warning | [RW] | When set to true, the user will be notified by email when a backup process is successful, but has warnings |
Performs the notification Takes a flag to indicate that a failure has occured. (this is only set from Model#perform! in the event of an error) If this is the case it will set the ‘action’ to :failure. Otherwise, it will set the ‘action’ to either :success or :warning, depending on whether or not any warnings were sent to the Logger. It will then invoke the notify! method with the ‘action’, but only if the proper on_success, on_warning or on_failure flag is true.