Class: Actions::Staypuft::Host::ReportWait

Inherits:
Base
  • Object
show all
Includes:
Dynflow::Action::Polling
Defined in:
app/lib/actions/staypuft/host/report_wait.rb

Instance Method Summary collapse

Instance Method Details

#done?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 30

def done?
  external_task
end

#external_taskObject



26
27
28
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 26

def external_task
  output[:status]
end

#plan(host_id, after) ⇒ Object



22
23
24
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 22

def plan(host_id, after)
  plan_self host_id: host_id, after: after
end

#run(event = nil) ⇒ Object



42
43
44
45
46
47
48
49
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 42

def run(event = nil)
  case event
  when Dynflow::Action::Skip
    output[:status] = true
  else
    super(event)
  end
end

#run_progressObject



38
39
40
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 38

def run_progress
  0.1
end

#run_progress_weightObject



34
35
36
# File 'app/lib/actions/staypuft/host/report_wait.rb', line 34

def run_progress_weight
  4
end