Skip to content

Commit

Permalink
Merge pull request #54 from aligent/fix/invalidation_rules
Browse files Browse the repository at this point in the history
Invalidate both full and incremental exports in pending or uploaded status
  • Loading branch information
aligent-lturner authored Nov 27, 2024
2 parents 7a0cc30 + b0f1544 commit 4e1a5d2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/export/Model/InvalidateExports.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ public function execute(): void
/** @var Collection $collection */
$collection = $this->collectionFactory->create();
// need to check pending and uploaded exports only
$collection->addFieldToFilter(ExportInterface::FIELD_STATUS, ExportInterface::STATUS_PENDING);
$collection->addFieldToFilter(ExportInterface::FIELD_EXPORT_TYPE, ExportInterface::EXPORT_TYPE_INCREMENTAL);
$collection->addFieldToFilter(
ExportInterface::FIELD_STATUS,
['in' => [ExportInterface::STATUS_PENDING, ExportInterface::STATUS_UPLOADED]]
);
$collection->addFieldToFilter(
ExportInterface::FIELD_EXPORT_TYPE,
['in' => [ExportInterface::EXPORT_TYPE_INCREMENTAL, ExportInterface::EXPORT_TYPE_FULL]]
);
/** @var Export[] $exports */
$exports = $collection->getItems();
foreach ($exports as $export) {
Expand Down

0 comments on commit 4e1a5d2

Please sign in to comment.