Parallel resource download workers

This commit is contained in:
Nikhil Badyal
2025-06-20 15:02:38 +05:30
parent 7a4d78cc4b
commit f9fa5cef11
3 changed files with 4 additions and 1 deletions
+2
View File
@@ -130,6 +130,8 @@ You can use any of the following methods to build.
| [APPRISE_URL](#apprise) | Apprise URL . | None |
| [APPRISE_NOTIFICATION_TITLE](#apprise) | Apprise Notification Title . | None |
| [APPRISE_NOTIFICATION_BODY](#apprise) | Apprise Notification Body . | None |
| MAX_RESOURCE_WORKERS | Maximum workers for downloading resources | 3 |
`*` - Can be overridden for individual app.
### App Level Config
+1 -1
View File
@@ -229,7 +229,7 @@ class APP(object):
(name, url, config, filter_pattern) for name, url, _, filter_pattern in base_tasks
]
with ThreadPoolExecutor(1) as executor:
with ThreadPoolExecutor(config.max_resource_workers) as executor: # Use configurable worker count
futures: dict[str, concurrent.futures.Future[tuple[str, str]]] = {}
for resource_name, raw_url, cfg, assets_filter in download_tasks:
+1
View File
@@ -31,3 +31,4 @@ class RevancedConfig(object):
self.apps = sorted(env.list("PATCH_APPS", default_build))
self.global_old_key = env.bool("GLOBAL_OLD_KEY", True)
self.global_space_formatted = env.bool("GLOBAL_SPACE_FORMATTED_PATCHES", True)
self.max_resource_workers = env.int("MAX_RESOURCE_WORKERS", 3)