lib/dynflow/world.rb
# 24119 - ensure delayed executor is preserved after invalidation
# executes plans that are planned/paused and haven't reported any error yet (usually when no executor
# was available by the time of planning or terminating)
ensure delayed executor is preserved after invalidation
executes plans that are planned/paused and haven't reported any error yet (usually when no executor
was available by the time of planning or terminating)
ensure delayed executor is preserved after invalidation executes plans that are planned / paused and haven ' t reported any error yet ( usually when no executor was available by the time of planning or terminating )
def auto_execute
      coordinator.acquire(Coordinator::AutoExecuteLock.new(self)) do
        planned_execution_plans =
            self.persistence.find_execution_plans filters: { 'state' => %w(planned paused), 'result' => (ExecutionPlan.results - [:error]).map(&:to_s) }
        planned_execution_plans.map do |ep|
          if coordinator.find_locks(Dynflow::Coordinator::ExecutionLock.unique_filter(ep.id)).empty?
            execute(ep.id)
          end
        end.compact
      end
    rescue Coordinator::LockError => e
      logger.info "auto-executor lock already aquired: #{e.message}"
      []
    end
def auto_execute coordinator . acquire ( Coordinator :: AutoExecuteLock . new ( self ) ) do planned_execution_plans = self . persistence . find_execution_plans filters : { 'state' => %w( planned paused ) , 'result' => ( ExecutionPlan . results - [ :error ] ) . map ( & :to_s ) } planned_execution_plans . map do | ep | if coordinator . find_locks ( Dynflow :: Coordinator :: ExecutionLock . unique_filter ( ep . id ) ) . empty? execute ( ep . id ) end end . compact end rescue Coordinator :: LockError => e logger . info "auto-executor lock already aquired: #{e.message}" [ ] end
24119 - ensure delayed executor is preserved after invalidation
executes plans that are planned/paused and haven't reported any error yet (usually when no executor
was available by the time of planning or terminating)
24119 - ensure delayed executor is preserved after invalidation executes plans that are planned / paused and haven ' t reported any error yet ( usually when no executor was available by the time of planning or terminating )