fix: calculate node limit using MiB instead of MB

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2025-09-08 15:11:05 +02:00
parent eda72da5ae
commit 05613984bb
No known key found for this signature in database
GPG key ID: 27137D9E7D273FB2

View file

@ -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;
}