Keep sleep_interval under half of the maximum

This commit is contained in:
tcely 2025-04-06 19:11:46 -04:00 committed by GitHub
parent 2a3df669c9
commit a2426a1453
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -316,7 +316,7 @@ def download_media(
'check_formats': None,
'overwrites': None,
'skip_unavailable_fragments': False,
'sleep_interval': max(10, int(settings.DOWNLOAD_MEDIA_DELAY / 20)),
'sleep_interval': min(10*60, max(10, int(settings.DOWNLOAD_MEDIA_DELAY / 20))),
'max_sleep_interval': min(20*60, max(60, settings.DOWNLOAD_MEDIA_DELAY)),
'sleep_interval_requests': 1 + (2 * settings.BACKGROUND_TASK_ASYNC_THREADS),
'paths': opts.get('paths', dict()),