Skip to content

Commit

Permalink
fix(FaceClusterAnalyzer): If no batch size is set, remove php memory …
Browse files Browse the repository at this point in the history
…limit

fixes #716

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Mar 19, 2023
1 parent 9c8cdcf commit 308f9d4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Service/FaceClusterAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ public function setMinDatasetSize(int $minSize) : void {
public function calculateClusters(string $userId, int $batchSize = 0): void {
$this->logger->debug('ClusterDebug: Retrieving face detections for user ' . $userId);

if ($batchSize === 0) {
ini_set('memory_limit', -1);
}

$unclusteredDetections = $this->faceDetections->findUnclusteredByUserId($userId, $batchSize);

$unclusteredDetections = array_values(array_filter($unclusteredDetections, fn ($detection) =>
Expand Down

0 comments on commit 308f9d4

Please sign in to comment.