Merge pull request #54951 from nextcloud/fix/node-limit-mib

fix: calculate node limit using MiB instead of MB
pull/54957/head
Ferdinand Thiessen 4 weeks ago committed by GitHub
commit 23c2df0d50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      core/BackgroundJobs/GenerateMetadataJob.php

@ -98,7 +98,8 @@ class GenerateMetadataJob extends TimedJob {
// Files are loaded in memory so very big files can lead to an OOM on the server
$nodeSize = $node->getSize();
$nodeLimit = $this->config->getSystemValueInt('metadata_max_filesize', self::DEFAULT_MAX_FILESIZE);
if ($nodeSize > $nodeLimit * 1000000) {
$nodeLimitMib = $nodeLimit * 1024 * 1024;
if ($nodeSize > $nodeLimitMib) {
$this->logger->debug('Skipping generating metadata for fileid ' . $node->getId() . " as its size exceeds configured 'metadata_max_filesize'.");
continue;
}

Loading…
Cancel
Save