class Dynflow::Action::Progress::Calculate
Public Instance Methods
finalize(*args)
click to toggle source
# File lib/dynflow/action/progress.rb, line 20 def finalize(*args) with_progress_calculation(*args) do [action.finalize_progress, action.finalize_progress_weight] end end
run(*args)
click to toggle source
# File lib/dynflow/action/progress.rb, line 14 def run(*args) with_progress_calculation(*args) do [action.run_progress, action.run_progress_weight] end end
Protected Instance Methods
with_progress_calculation(*args) { || ... }
click to toggle source
# File lib/dynflow/action/progress.rb, line 28 def with_progress_calculation(*args) pass(*args) ensure begin action.calculated_progress = yield rescue => error # we don't want progress calculation to cause fail of the whole process # TODO: introduce post-execute state for handling issues with additional # calculations after the step is run action.action_logger.error('Error in progress calculation') action.action_logger.error(error) end end