🐛 Failing to fetch latest release

This commit is contained in:
Nikhil Badyal
2023-08-05 21:46:19 +05:30
parent 2680881e20
commit f37815fdf9
2 changed files with 9 additions and 4 deletions
+4 -4
View File
@@ -51,7 +51,7 @@ class APP(object):
return ", ".join("%s: %s" % item for item in attrs.items())
@staticmethod
def download(url: str, config: RevancedConfig, assets_filter: str = None) -> str: # type: ignore
def download(url: str, config: RevancedConfig, assets_filter: str) -> str:
"""Downloader."""
from src.downloader.download import Downloader
@@ -70,14 +70,14 @@ class APP(object):
logger.info("Downloading resources for patching.")
# Create a list of resource download tasks
download_tasks = [
("cli", self.cli_dl, config),
("integrations", self.integrations_dl, config),
("cli", self.cli_dl, config, ".*jar"),
("integrations", self.integrations_dl, config, ".*apk"),
("patches", self.patches_dl, config, ".*jar"),
("patches_json", self.patches_dl, config, ".*json"),
]
# Using a ThreadPoolExecutor for parallelism
with ThreadPoolExecutor() as executor:
with ThreadPoolExecutor(4) as executor:
futures = {
resource_name: executor.submit(self.download, *args)
for resource_name, *args in download_tasks