Skip to content

Commit

Permalink
Force GC
Browse files Browse the repository at this point in the history
  • Loading branch information
supercid committed Aug 1, 2024

Verified

This commit was signed with the committer’s verified signature.
wjhsf Will Harney
1 parent 684069c commit 49a06a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Model/Service/Sync/Upsert/SyncService.php
Original file line number Diff line number Diff line change
@@ -169,14 +169,15 @@ public function syncProducts(ProductCollection $collection, Store $store)

$this->logDebugWithStore(
sprintf(
'Upserting batch of %d (%s) - API timeout is set to %d seconds',
'GC ON: Upserting batch of %d (%s) - API timeout is set to %d seconds',
$this->apiBatchSize,
implode(',', $productIdsInBatch),
$this->apiTimeout
),
$store
);
$op->upsert();
gc_collect_cycles();
}
$this->logBenchmarkSummary(self::BENCHMARK_SYNC_NAME, $store, $this);
}

0 comments on commit 49a06a0

Please sign in to comment.