Merge pull request #1145 from tcely/patch-13

Ignore `TUBESYNC_WORKERS` entirely
This commit is contained in:
meeb authored and GitHub committed 2025-06-24 00:06:06 +10:00
commit 592f2d1787
2 files changed
+5 -11

No files matched your search

+2 -6
View File
@@ -209,10 +209,6 @@ def get_media_info(url, /, *, days=None, info_json=None):
'verbose': True if settings.DEBUG else False,
'writeinfojson': True,
})
if settings.BACKGROUND_TASK_RUN_ASYNC:
opts.update({
'sleep_interval_requests': 2 * settings.BACKGROUND_TASK_ASYNC_THREADS,
})
if start:
log.debug(f'get_media_info: used date range: {opts["daterange"]} for URL: {url}')
response = {}
@@ -353,8 +349,8 @@ def download_media(
'overwrites': None,
'skip_unavailable_fragments': False,
'sleep_interval': 10,
'max_sleep_interval': min(20*60, max(60, settings.DOWNLOAD_MEDIA_DELAY)),
'sleep_interval_requests': 1 + (2 * settings.BACKGROUND_TASK_ASYNC_THREADS),
'max_sleep_interval': min(15*60, max(60, settings.DOWNLOAD_MEDIA_DELAY)),
'sleep_interval_requests': 3,
'extractor_args': opts.get('extractor_args', dict()),
'paths': opts.get('paths', dict()),
'postprocessor_args': opts.get('postprocessor_args', dict()),
+3 -5
View File
@@ -166,9 +166,6 @@ HEALTHCHECK_ALLOWED_IPS = ('127.0.0.1',)
MAX_ATTEMPTS = 15 # Number of times tasks will be retried
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
BACKGROUND_TASK_PRIORITY_ORDERING = 'ASC' # Use 'niceness' task priority ordering
COMPLETED_TASKS_DAYS_TO_KEEP = 7 # Number of days to keep completed tasks
MAX_ENTRIES_PROCESSING = 0 # Number of videos to process on source refresh (0 for no limit)
@@ -249,8 +246,9 @@ if MAX_RUN_TIME < 600:
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
BACKGROUND_TASK_RUN_ASYNC = False
BACKGROUND_TASK_ASYNC_THREADS = 1
# MAX_BACKGROUND_TASK_ASYNC_THREADS = 1
from .dbutils import patch_ensure_connection # noqa