Skip to content

Commit

Permalink
fix: is full sync done checl (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
fox-john authored May 15, 2024
1 parent 0832973 commit eb1a41b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ps_eventbus.php
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ public function hookActionObjectSpecificPriceDeleteAfter($parameters)
private function sendLiveSync(string $shopContent, int $shopContentId, string $action)
{
if ($this->isFullSyncDone($shopContent)) {
return;
// SEND live sync only when fullsync is done
}
}

Expand Down Expand Up @@ -1610,19 +1610,15 @@ private function insertIncrementalSyncObject($objectId, $type, $date, $shopId, $

foreach ($languagesIsoCodes as $languagesIsoCode) {
if ($this->isFullSyncDone($type, $languagesIsoCode)) {
return;
$incrementalSyncRepository->insertIncrementalObject($objectId, $type, $date, $shopId, $languagesIsoCode);
}

$incrementalSyncRepository->insertIncrementalObject($objectId, $type, $date, $shopId, $languagesIsoCode);
}
} else {
$languagesIsoCode = $languageRepository->getDefaultLanguageIsoCode();

if ($this->isFullSyncDone($type, $languagesIsoCode)) {
return;
$incrementalSyncRepository->insertIncrementalObject($objectId, $type, $date, $shopId, $languagesIsoCode);
}

$incrementalSyncRepository->insertIncrementalObject($objectId, $type, $date, $shopId, $languagesIsoCode);
}
}

Expand Down

0 comments on commit eb1a41b

Please sign in to comment.