mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-24 14:06:36 +00:00
Merge pull request #1003 from tcely/patch-6
Adjust metadata & media download delays
This commit is contained in:
commit
ea76b23711
@ -135,7 +135,7 @@ HEALTHCHECK_ALLOWED_IPS = ('127.0.0.1',)
|
|||||||
|
|
||||||
|
|
||||||
MAX_ATTEMPTS = 15 # Number of times tasks will be retried
|
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_RUN_ASYNC = False # Run tasks async in the background
|
||||||
BACKGROUND_TASK_ASYNC_THREADS = 1 # Number of async tasks to run at once
|
BACKGROUND_TASK_ASYNC_THREADS = 1 # Number of async tasks to run at once
|
||||||
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
|
MAX_BACKGROUND_TASK_ASYNC_THREADS = 8 # For sanity reasons
|
||||||
@ -173,6 +173,8 @@ YOUTUBE_DEFAULTS = {
|
|||||||
'cachedir': False, # Disable on-disk caching
|
'cachedir': False, # Disable on-disk caching
|
||||||
'addmetadata': True, # Embed metadata during postprocessing where available
|
'addmetadata': True, # Embed metadata during postprocessing where available
|
||||||
'geo_verification_proxy': getenv('geo_verification_proxy').strip() or None,
|
'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'
|
COOKIES_FILE = CONFIG_BASE_DIR / 'cookies.txt'
|
||||||
|
|
||||||
@ -210,7 +212,7 @@ except:
|
|||||||
if MAX_RUN_TIME < 600:
|
if MAX_RUN_TIME < 600:
|
||||||
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:
|
if BACKGROUND_TASK_ASYNC_THREADS > MAX_BACKGROUND_TASK_ASYNC_THREADS:
|
||||||
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS
|
BACKGROUND_TASK_ASYNC_THREADS = MAX_BACKGROUND_TASK_ASYNC_THREADS
|
||||||
|
Loading…
Reference in New Issue
Block a user