diff --git a/lib/dynflow/world/invalidation.rb b/lib/dynflow/world/invalidation.rb index f8ec7d87..069ed25b 100644 --- a/lib/dynflow/world/invalidation.rb +++ b/lib/dynflow/world/invalidation.rb @@ -117,7 +117,14 @@ def with_valid_execution_plan_for_lock(execution_lock) # @return [Integer] number of invalidated worlds def perform_validity_checks world_invalidation_result = worlds_validity_check - locks_validity_check + locks_validity_check.each do |lock| + case lock + when ::Dynflow::Coordinator::PlanningLock + invalidate_planning_lock(lock) + when ::Dynflow::Coordinator::ExecutionLock + invalidate_execution_lock(lock) + end + end pruned = connector.prune_undeliverable_envelopes(self) logger.error("Pruned #{pruned} undeliverable envelopes") unless pruned.zero? world_invalidation_result.values.select { |result| result == :invalidated }.size