Class: Kuroko2::Workflow::Notifier::Mail
- Inherits:
-
Object
- Object
- Kuroko2::Workflow::Notifier::Mail
- Defined in:
- lib/autoload/kuroko2/workflow/notifier/mail.rb
Instance Method Summary collapse
-
#initialize(job_instance) ⇒ Mail
constructor
A new instance of Mail.
- #notify_back_to_normal ⇒ Object
- #notify_cancellation ⇒ Object
- #notify_critical ⇒ Object
- #notify_failure ⇒ Object
- #notify_finished ⇒ Object
- #notify_launch ⇒ Object
- #notify_long_elapsed_time ⇒ Object
- #notify_retrying ⇒ Object
- #notify_skipping ⇒ Object
Constructor Details
#initialize(job_instance) ⇒ Mail
Returns a new instance of Mail.
5 6 7 8 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 5 def initialize(job_instance) @job_instance = job_instance @definition = job_instance.job_definition end |
Instance Method Details
#notify_back_to_normal ⇒ Object
40 41 42 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 40 def notify_back_to_normal # do nothing end |
#notify_cancellation ⇒ Object
22 23 24 25 26 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 22 def notify_cancellation if @definition.notify_cancellation deliver_job_failure end end |
#notify_critical ⇒ Object
32 33 34 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 32 def notify_critical deliver_job_failure end |
#notify_failure ⇒ Object
28 29 30 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 28 def notify_failure deliver_job_failure end |
#notify_finished ⇒ Object
36 37 38 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 36 def notify_finished # do nothing end |
#notify_launch ⇒ Object
10 11 12 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 10 def notify_launch # do nothing end |
#notify_long_elapsed_time ⇒ Object
44 45 46 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 44 def notify_long_elapsed_time Kuroko2::Notifications.notify_long_elapsed_time(@job_instance).deliver_now end |
#notify_retrying ⇒ Object
14 15 16 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 14 def # do nothing end |
#notify_skipping ⇒ Object
18 19 20 |
# File 'lib/autoload/kuroko2/workflow/notifier/mail.rb', line 18 def notify_skipping # do nothing end |