lib/dynflow/world/invalidation.rb
# Invalidate another world, that left some data in the runtime,
# but it's not really running
#
# @param world [Coordinator::ClientWorld, Coordinator::ExecutorWorld] coordinator record
#   left behind by the world we're trying to invalidate
# @return [void]
Invalidate another world, that left some data in the runtime,
but it's not really running
Invalidate another world that left some data in the runtime but it ' s not really running
def invalidate_planning_lock(planning_lock)
        with_valid_execution_plan_for_lock(planning_lock) do |plan|
          plan.steps.values.each { |step| invalidate_step step }
          state = if plan.plan_steps.any? && plan.plan_steps.all? { |step| step.state == :success }
                    :planned
                  else
                    :stopped
                  end
          plan.update_state(state) if plan.state != state
          coordinator.release(planning_lock)
          execute(plan.id) if plan.state == :planned
        end
      end
def invalidate_planning_lock ( planning_lock ) with_valid_execution_plan_for_lock ( planning_lock ) do | plan | plan . steps . values . each { | step | invalidate_step step } state = if plan . plan_steps . any? && plan . plan_steps . all? { | step | step . state == :success } :planned else :stopped end plan . update_state ( state ) if plan . state != state coordinator . release ( planning_lock ) execute ( plan . id ) if plan . state == :planned end end
Invalidate another world, that left some data in the runtime,
but it's not really running
Invalidate another world that left some data in the runtime but it ' s not really running
None
void
planning_lock
world
coordinator record left behind by the world we're trying to invalidate
coordinator record left behind by the world we ' re trying to invalidate