Do not process the metadata parsing results till the queue is empty, to avoid starvation of the workers

This commit is contained in:
emeric
2024-03-15 00:02:28 +01:00
parent 03425f3c94
commit db692260a2
@@ -368,7 +368,7 @@ namespace lms::scanner
_progressCallback(context.currentStepStats);
}
while (_metadataScanQueue.getResultsCount() > processMetaDataBatchSize)
while (_metadataScanQueue.getResultsCount() > (scanQueueMaxScanRequestCount / 2))
{
_metadataScanQueue.popResults(scanResults, processMetaDataBatchSize);
processMetaDataScanResults(context, scanResults, mediaLibrary);