Skip to content

Commit

Permalink
[Order] Skip empty flush during expired carts removal
Browse files Browse the repository at this point in the history
  • Loading branch information
lchrusciel committed Oct 26, 2022
1 parent 5b4d7b3 commit 58e46e9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ public function remove(): void
}
}

$this->orderManager->flush();
if ($interval % $this->batchSize !== 0) {
$this->orderManager->flush();
}

$this->eventDispatcher->dispatch(new GenericEvent($expiredCarts), SyliusExpiredCartsEvents::POST_REMOVE);
}
Expand Down

0 comments on commit 58e46e9

Please sign in to comment.