Class: Actions::Staypuft::Host::WaitUntilInstalled
- Inherits:
-
Base
- Object
- Base
- Actions::Staypuft::Host::WaitUntilInstalled
- Defined in:
- app/lib/actions/staypuft/host/wait_until_installed.rb
Instance Method Summary collapse
- #plan(host_id) ⇒ Object
- #run(event = nil) ⇒ Object
- #run_progress ⇒ Object
- #run_progress_weight ⇒ Object
Instance Method Details
#plan(host_id) ⇒ Object
37 38 39 |
# File 'app/lib/actions/staypuft/host/wait_until_installed.rb', line 37 def plan(host_id) plan_self host_id: host_id end |
#run(event = nil) ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/lib/actions/staypuft/host/wait_until_installed.rb', line 21 def run(event = nil) case event when nil suspend do |suspended_action| Rails.cache.write( ::Staypuft::Concerns::HostOrchestrationBuildHook.cache_id(input[:host_id]), { execution_plan_id: suspended_action.execution_plan_id, step_id: suspended_action.step_id }) end when Hash output[:installed_at] = event.fetch(:installed_at).to_s else raise TypeError end end |
#run_progress ⇒ Object
45 46 47 |
# File 'app/lib/actions/staypuft/host/wait_until_installed.rb', line 45 def run_progress 0.1 end |
#run_progress_weight ⇒ Object
41 42 43 |
# File 'app/lib/actions/staypuft/host/wait_until_installed.rb', line 41 def run_progress_weight 4 end |