Skip to content

Commit

Permalink
Merge branch 'v1-develop' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
hostep committed Oct 23, 2021
2 parents 28b6cf1 + d1c799e commit be8cd95
Show file tree
Hide file tree
Showing 7 changed files with 310 additions and 220 deletions.
4 changes: 3 additions & 1 deletion Checker/Catalog/Category/UrlPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ private function fetchAllCategoriesWithUrlPathCalculatedByUrlKey()
if (array_key_exists($id, $tempCatData)) {
$calculatedUrlPath[] = $tempCatData[$id]['url_key'];
} else {
throw new LocalizedException(__("Can't find category with id: '$id'"));
throw new LocalizedException(__(
"Can't find category with id: '$id' (this id comes from a category's path attribute)"
));
}
}

Expand Down
13 changes: 10 additions & 3 deletions Updater/Catalog/Category/UrlKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ public function refresh(string $initiator): array
$this->metaStorage->setErrorMessage($storageIdentifier, '');
$this->metaStorage->setStartRefreshing($storageIdentifier, $initiator);

$categoryData = $this->urlKeyChecker->execute();
$this->storage->write($storageIdentifier, $categoryData);
try {
$categoryData = $this->urlKeyChecker->execute();
$this->storage->write($storageIdentifier, $categoryData);

$this->metaStorage->setFinishedRefreshing($storageIdentifier);
$this->metaStorage->setFinishedRefreshing($storageIdentifier);
} catch (\Throwable $ex) {
$this->metaStorage->clearStatus($storageIdentifier);
$this->metaStorage->setErrorMessage($storageIdentifier, $ex->getMessage());

throw $ex;
}

return $categoryData;
}
Expand Down
13 changes: 10 additions & 3 deletions Updater/Catalog/Category/UrlPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ public function refresh(string $initiator): array
$this->metaStorage->setErrorMessage($storageIdentifier, '');
$this->metaStorage->setStartRefreshing($storageIdentifier, $initiator);

$categoryData = $this->urlPathChecker->execute();
$this->storage->write($storageIdentifier, $categoryData);
try {
$categoryData = $this->urlPathChecker->execute();
$this->storage->write($storageIdentifier, $categoryData);

$this->metaStorage->setFinishedRefreshing($storageIdentifier);
$this->metaStorage->setFinishedRefreshing($storageIdentifier);
} catch (\Throwable $ex) {
$this->metaStorage->clearStatus($storageIdentifier);
$this->metaStorage->setErrorMessage($storageIdentifier, $ex->getMessage());

throw $ex;
}

return $categoryData;
}
Expand Down
13 changes: 10 additions & 3 deletions Updater/Catalog/Product/UrlKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ public function refresh(string $initiator): array
$this->metaStorage->setErrorMessage($storageIdentifier, '');
$this->metaStorage->setStartRefreshing($storageIdentifier, $initiator);

$productData = $this->urlKeyChecker->execute();
$this->storage->write($storageIdentifier, $productData);
try {
$productData = $this->urlKeyChecker->execute();
$this->storage->write($storageIdentifier, $productData);

$this->metaStorage->setFinishedRefreshing($storageIdentifier);
$this->metaStorage->setFinishedRefreshing($storageIdentifier);
} catch (\Throwable $ex) {
$this->metaStorage->clearStatus($storageIdentifier);
$this->metaStorage->setErrorMessage($storageIdentifier, $ex->getMessage());

throw $ex;
}

return $productData;
}
Expand Down
13 changes: 10 additions & 3 deletions Updater/Catalog/Product/UrlPath.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ public function refresh(string $initiator): array
$this->metaStorage->setErrorMessage($storageIdentifier, '');
$this->metaStorage->setStartRefreshing($storageIdentifier, $initiator);

$productData = $this->urlPathChecker->execute();
$this->storage->write($storageIdentifier, $productData);
try {
$productData = $this->urlPathChecker->execute();
$this->storage->write($storageIdentifier, $productData);

$this->metaStorage->setFinishedRefreshing($storageIdentifier);
$this->metaStorage->setFinishedRefreshing($storageIdentifier);
} catch (\Throwable $ex) {
$this->metaStorage->clearStatus($storageIdentifier);
$this->metaStorage->setErrorMessage($storageIdentifier, $ex->getMessage());

throw $ex;
}

return $productData;
}
Expand Down
Loading

0 comments on commit be8cd95

Please sign in to comment.