Module: Dynflow::Action::Progress

Included in:
Dynflow::Action
Defined in:
lib/dynflow/action/progress.rb

Overview

Methods for specifying the progress of the action the *_progress methods should return number in 0..1. The weight is there to increase/decrease the portion of this task in the context of other tasks in execution plan. Normal action has weight 1.

The *_progress is run only when the action is in running/suspend state. Otherwise the progress is 1 for success/skipped actions and 0 for errorneous ones.

Defined Under Namespace

Classes: Calculate

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#calculated_progressObject

Returns the value of attribute calculated_progress.



61
62
63
# File 'lib/dynflow/action/progress.rb', line 61

def calculated_progress
  @calculated_progress
end

Instance Method Details

#finalize_progressObject



53
54
55
# File 'lib/dynflow/action/progress.rb', line 53

def finalize_progress
  0.5
end

#finalize_progress_weightObject



57
58
59
# File 'lib/dynflow/action/progress.rb', line 57

def finalize_progress_weight
  1
end

#run_progressObject



45
46
47
# File 'lib/dynflow/action/progress.rb', line 45

def run_progress
  0.5
end

#run_progress_weightObject



49
50
51
# File 'lib/dynflow/action/progress.rb', line 49

def run_progress_weight
  1
end