Class: Actions::Staypuft::Host::ReportWait
- Inherits:
-
Base
- Object
- Base
- Actions::Staypuft::Host::ReportWait
- Includes:
- Dynflow::Action::Polling
- Defined in:
- app/lib/actions/staypuft/host/report_wait.rb
Constant Summary collapse
- TIMEOUT =
9000
Instance Method Summary collapse
- #done? ⇒ Boolean
- #external_task ⇒ Object
- #plan(host_id, after) ⇒ Object
- #run(event = nil) ⇒ Object
- #run_progress ⇒ Object
- #run_progress_weight ⇒ Object
Instance Method Details
#done? ⇒ Boolean
33 34 35 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 33 def done? external_task end |
#external_task ⇒ Object
29 30 31 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 29 def external_task output[:status] end |
#plan(host_id, after) ⇒ Object
25 26 27 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 25 def plan(host_id, after) plan_self host_id: host_id, after: after end |
#run(event = nil) ⇒ Object
45 46 47 48 49 50 51 52 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 45 def run(event = nil) case event when Dynflow::Action::Skip output[:status] = true else super(event) end end |
#run_progress ⇒ Object
41 42 43 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 41 def run_progress 0.1 end |
#run_progress_weight ⇒ Object
37 38 39 |
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 37 def run_progress_weight 4 end |