Skip to content

Commit

Permalink
FEATURE: AssetUsage as CatchUpHook
Browse files Browse the repository at this point in the history
  • Loading branch information
dlubitz committed Sep 27, 2024
1 parent 0ab0d8c commit 09232ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Neos.Neos/Classes/AssetUsage/AssetUsageIndexingProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@ public function buildIndex(ContentRepository $contentRepository, NodeTypeName $n
$workspace = array_shift($workspaces);

$contentGraph = $contentRepository->getContentGraph($workspace->workspaceName);
$this->dispatchMessage($callback, sprintf(' Workspace: %s', $contentGraph->getWorkspaceName()->value));

$dimensionSpacePoints = $variationGraph->getDimensionSpacePoints();

$rootNodeAggregate = $contentGraph->findRootNodeAggregateByType(
$nodeTypeName
);
if ($rootNodeAggregate === null) {
throw new NodeAggregateCurrentlyDoesNotExist("RootNode aggregate not found");
$this->dispatchMessage($callback, sprintf(' ERROR: %s', "Root node aggregate was not found."));
}
$rootNodeAggregateId = $rootNodeAggregate->nodeAggregateId;

Check failure on line 56 in Neos.Neos/Classes/AssetUsage/AssetUsageIndexingProcessor.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 Test linting-unit-functionaltests-mysql (deps: highest)

Cannot access property $nodeAggregateId on Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate|null.

Check failure on line 56 in Neos.Neos/Classes/AssetUsage/AssetUsageIndexingProcessor.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 Test linting-unit-functionaltests-mysql (deps: highest)

Cannot access property $nodeAggregateId on Neos\ContentRepository\Core\Projection\ContentGraph\NodeAggregate|null.

$this->dispatchMessage($callback, sprintf(' Workspace: %s', $contentGraph->getWorkspaceName()->value));

foreach ($dimensionSpacePoints as $dimensionSpacePoint) {
$this->dispatchMessage($callback, sprintf(' DimensionSpacePoint: %s', $dimensionSpacePoint->toJson()));

Expand All @@ -68,7 +68,6 @@ public function buildIndex(ContentRepository $contentRepository, NodeTypeName $n
continue;
}
$this->assetUsageIndexingService->updateIndex($contentRepository->id, $childNode);

array_push($childNodes, ...iterator_to_array($subgraph->findChildNodes($childNode->aggregateId, FindChildNodesFilter::create())));
}
}
Expand Down

0 comments on commit 09232ad

Please sign in to comment.