From 48bca2b996f2db239dc1ef3495be7093a3599591 Mon Sep 17 00:00:00 2001 From: tcely Date: Tue, 8 Apr 2025 14:45:44 -0400 Subject: [PATCH] Enable the `ThreadPool` when `TUBESYNC_WORKERS` is used --- tubesync/tubesync/local_settings.py.container | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tubesync/tubesync/local_settings.py.container b/tubesync/tubesync/local_settings.py.container index cc20f73b..4f386b66 100644 --- a/tubesync/tubesync/local_settings.py.container +++ b/tubesync/tubesync/local_settings.py.container @@ -62,6 +62,8 @@ else: DEFAULT_THREADS = 1 BACKGROUND_TASK_ASYNC_THREADS = getenv('TUBESYNC_WORKERS', DEFAULT_THREADS, integer=True) +if BACKGROUND_TASK_ASYNC_THREADS > 1: + BACKGROUND_TASK_RUN_ASYNC = True MEDIA_ROOT = CONFIG_BASE_DIR / 'media'