Do not process the metadata parsing results till the queue is empty, to avoid starvation of the workers
This commit is contained in:
@@ -368,7 +368,7 @@ namespace lms::scanner
|
|||||||
_progressCallback(context.currentStepStats);
|
_progressCallback(context.currentStepStats);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (_metadataScanQueue.getResultsCount() > processMetaDataBatchSize)
|
while (_metadataScanQueue.getResultsCount() > (scanQueueMaxScanRequestCount / 2))
|
||||||
{
|
{
|
||||||
_metadataScanQueue.popResults(scanResults, processMetaDataBatchSize);
|
_metadataScanQueue.popResults(scanResults, processMetaDataBatchSize);
|
||||||
processMetaDataScanResults(context, scanResults, mediaLibrary);
|
processMetaDataScanResults(context, scanResults, mediaLibrary);
|
||||||
|
|||||||
Reference in New Issue
Block a user