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
- 
  
    
      #calculated_progress  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    
Returns the value of attribute calculated_progress.
 
Instance Method Summary collapse
- #finalize_progress ⇒ Object
 - #finalize_progress_weight ⇒ Object
 - #run_progress ⇒ Object
 - #run_progress_weight ⇒ Object
 
Instance Attribute Details
#calculated_progress ⇒ Object
Returns the value of attribute calculated_progress.
      59 60 61  | 
    
      # File 'lib/dynflow/action/progress.rb', line 59 def calculated_progress @calculated_progress end  | 
  
Instance Method Details
#finalize_progress ⇒ Object
      51 52 53  | 
    
      # File 'lib/dynflow/action/progress.rb', line 51 def finalize_progress 0.5 end  | 
  
#finalize_progress_weight ⇒ Object
      55 56 57  | 
    
      # File 'lib/dynflow/action/progress.rb', line 55 def finalize_progress_weight 1 end  | 
  
#run_progress ⇒ Object
      43 44 45  | 
    
      # File 'lib/dynflow/action/progress.rb', line 43 def run_progress 0.5 end  | 
  
#run_progress_weight ⇒ Object
      47 48 49  | 
    
      # File 'lib/dynflow/action/progress.rb', line 47 def run_progress_weight 1 end  |