Class: HR_Deploy::DisablePingerTask
- Defined in:
- lib/hr_deploy/tasks/disable_pinger_task.rb
Instance Attribute Summary
Attributes inherited from Task
#end_time, #error, #start_time
Instance Method Summary collapse
Methods inherited from Task
Constructor Details
This class inherits a constructor from HR_Deploy::Task
Instance Method Details
#reversal_instruction ⇒ Object
25 26 27 |
# File 'lib/hr_deploy/tasks/disable_pinger_task.rb', line 25 def reversal_instruction "Availability pinging is disabled\nTo enable: curl #{target.new_relic_enable_pinger_url}" end |
#run ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/hr_deploy/tasks/disable_pinger_task.rb', line 7 def run print_stage 'Disabling New Relic availability pinger...' execute_system_command("curl #{target.new_relic_disable_pinger_url}") if dry_run? || !confirm? self.success = true return end if confirm_successful?('New Relic availability pinger disabled?') self.success = true else self.success = false self.error = 'Could not disable New Relic availability pinger' end end |