Merge pull request #1003 from tcely/patch-6

Adjust metadata & media download delays
This commit is contained in:
meeb 2025-05-01 13:26:58 +10:00 committed by GitHub
commit ea76b23711
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -135,7 +135,7 @@ HEALTHCHECK_ALLOWED_IPS = ('127.0.0.1',)
MAX_ATTEMPTS = 15 # Number of times tasks will be retried
MAX_RUN_TIME = 1*(24*60*60) # Maximum amount of time in seconds a task can run
MAX_RUN_TIME = 12*(60*60) # Maximum amount of time in seconds a task can run
BACKGROUND_TASK_RUN_ASYNC = False # Run tasks async in the background
BACKGROUND_TASK_ASYNC_THREADS = 1 # Number of async tasks to run at once
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
@ -173,6 +173,8 @@ YOUTUBE_DEFAULTS = {
'cachedir': False, # Disable on-disk caching
'addmetadata': True, # Embed metadata during postprocessing where available
'geo_verification_proxy': getenv('geo_verification_proxy').strip() or None,
'max_sleep_interval': (60)*5,
'sleep_interval': 0.25,
}
COOKIES_FILE = CONFIG_BASE_DIR / 'cookies.txt'
@ -210,7 +212,7 @@ except:
if MAX_RUN_TIME < 600:
MAX_RUN_TIME = 600
DOWNLOAD_MEDIA_DELAY = 60 + (MAX_RUN_TIME / 50)
DOWNLOAD_MEDIA_DELAY = 1 + round(MAX_RUN_TIME / 100)
if BACKGROUND_TASK_ASYNC_THREADS > MAX_BACKGROUND_TASK_ASYNC_THREADS:
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS