mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-24 19:38:36 +09:00
✨ Improvements
This commit is contained in:
committed by
Nikhil Badyal
parent
c436c4bc98
commit
3fdb5b247a
@@ -1,5 +1,7 @@
|
||||
"""Check patching resource updates."""
|
||||
|
||||
from threading import Lock
|
||||
|
||||
from environs import Env
|
||||
from loguru import logger
|
||||
|
||||
@@ -16,12 +18,13 @@ def check_if_build_is_required() -> bool:
|
||||
config = RevancedConfig(env)
|
||||
needs_to_repatched = []
|
||||
resource_cache: dict[str, tuple[str, str]] = {}
|
||||
resource_lock = Lock()
|
||||
for app_name in env.list("PATCH_APPS", default_build):
|
||||
logger.info(f"Checking {app_name}")
|
||||
app_obj = get_app(config, app_name)
|
||||
old_patches_version = GitHubManager(env).get_last_version(app_obj, patches_version_key)
|
||||
old_patches_source = GitHubManager(env).get_last_version_source(app_obj, patches_dl_key)
|
||||
app_obj.download_patch_resources(config, resource_cache)
|
||||
app_obj.download_patch_resources(config, resource_cache, resource_lock)
|
||||
if GitHubManager(env).should_trigger_build(
|
||||
old_patches_version,
|
||||
old_patches_source,
|
||||
|
||||
Reference in New Issue
Block a user