You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Setup/Patch/Data/RebuildReplicasPatch.php
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -62,25 +62,14 @@ public function apply(): PatchInterface
62
62
// Area code is already set - nothing to do
63
63
}
64
64
65
-
$storeIds = array_filter(
66
-
array_keys($this->storeManager->getStores()),
67
-
function (int$storeId) { return$this->replicaManager->isReplicaSyncEnabled($storeId); }
68
-
);
65
+
$storeIds = $this->getStoreIdsEligibleForPatch();
69
66
70
67
try {
71
68
// Delete all replicas before resyncing in case of incorrect replica assignments
72
69
foreach ($storeIdsas$storeId) {
73
-
if (!$this->algoliaCredentialsManager->checkCredentialsWithSearchOnlyAPIKey($storeId)) {
74
-
$this->logger->warning("Algolia credentials are not configured for store $storeId. Skipping auto replica rebuild for this store. If you need to rebuild your replicas run `bin/magento algolia:replicas:rebuild`");
75
-
continue;
76
-
}
77
-
78
70
$this->retryDeleteReplica($storeId);
79
71
}
80
72
foreach ($storeIdsas$storeId) {
81
-
if (!$this->algoliaCredentialsManager->checkCredentialsWithSearchOnlyAPIKey($storeId)) {
if (!$this->replicaManager->isReplicaSyncEnabled($storeId)) returnfalse;
92
+
if (!$this->algoliaCredentialsManager->checkCredentials($storeId)) {
93
+
$this->logger->warning("Algolia credentials are not configured for store $storeId. Skipping auto replica rebuild for this store. If you need to rebuild your replicas run `bin/magento algolia:replicas:rebuild`");
0 commit comments