From d5715c7a7c6f5b0b4f75ff5e85b48f8ee82665fb Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Sat, 23 Nov 2024 21:46:31 +0100 Subject: [PATCH] TASK: Do not discover new subscriptions during catchup We do not expect any changes during runtime. Setup and status should handle this case. --- .../Functional/Subscription/SubscriptionNewStatusTest.php | 5 ++--- .../Classes/Subscription/Engine/SubscriptionEngine.php | 2 -- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Neos.ContentRepository.BehavioralTests/Tests/Functional/Subscription/SubscriptionNewStatusTest.php b/Neos.ContentRepository.BehavioralTests/Tests/Functional/Subscription/SubscriptionNewStatusTest.php index 38e4a477d0..6e46704b0f 100644 --- a/Neos.ContentRepository.BehavioralTests/Tests/Functional/Subscription/SubscriptionNewStatusTest.php +++ b/Neos.ContentRepository.BehavioralTests/Tests/Functional/Subscription/SubscriptionNewStatusTest.php @@ -10,7 +10,6 @@ use Neos\ContentRepository\Core\Subscription\Engine\ProcessedResult; use Neos\ContentRepository\Core\Subscription\Engine\SubscriptionEngineCriteria; use Neos\ContentRepository\Core\Subscription\SubscriptionAndProjectionStatus; -use Neos\ContentRepository\Core\Subscription\SubscriptionAndProjectionStatuses; use Neos\ContentRepository\Core\Subscription\SubscriptionId; use Neos\ContentRepository\Core\Subscription\SubscriptionStatus; use Neos\ContentRepository\TestSuite\Fakes\FakeProjectionFactory; @@ -69,8 +68,8 @@ public function newProjectionIsFoundConfigurationIsAdded() // todo status doesnt find this projection yet? self::assertNull($this->subscriptionStatus('Vendor.Package:NewFakeProjection')); - // do something that finds new subscriptions - $result = $this->subscriptionEngine->catchUpActive(); + // do something that finds new subscriptions, trigger a setup on a specific projection: + $result = $this->subscriptionEngine->setup(SubscriptionEngineCriteria::create([SubscriptionId::fromString('contentGraph')])); self::assertNull($result->errors); self::assertEquals( diff --git a/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php b/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php index 724f240428..72d5684a5f 100644 --- a/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php +++ b/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php @@ -205,8 +205,6 @@ private function catchUpSubscriptions(SubscriptionEngineCriteria $criteria, Subs { $this->logger?->info(sprintf('Subscription Engine: Start catching up subscriptions in state "%s".', $subscriptionStatus->value)); - $this->discoverNewSubscriptions(); - return $this->subscriptionManager->findForAndUpdate( SubscriptionCriteria::forEngineCriteriaAndStatus($criteria, $subscriptionStatus), function (Subscriptions $subscriptions) use ($subscriptionStatus, $progressClosure) {