Skip to content

Commit 0666a9a

Browse files
authored
fix: bug/issue-155/git-sha-slicing (#159)
1 parent 0f33845 commit 0666a9a

38 files changed

+3
-25
lines changed
-147 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

resolve_proxy_encoder/app/checks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def check_for_updates(github_url: str, package_name: str) -> Union[dict, None]:
5151
"is_latest": None,
5252
"remote_commit": None,
5353
"package_commit": pkg_commit,
54-
"commit_short_sha": pkg_commit[-4:] if pkg_commit else None,
54+
"commit_short_sha": pkg_commit[:4:] if pkg_commit else None,
5555
}
5656

5757
latest = False
@@ -93,7 +93,7 @@ def check_for_updates(github_url: str, package_name: str) -> Union[dict, None]:
9393
"is_latest": latest,
9494
"remote_commit": remote_commit,
9595
"package_commit": pkg_commit,
96-
"commit_short_sha": pkg_commit[-4:] if pkg_commit else None,
96+
"commit_short_sha": pkg_commit[:4:] if pkg_commit else None,
9797
}
9898

9999

resolve_proxy_encoder/app/cli.py

-22
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,6 @@
2121
from .utils.core import setup_rich_logging
2222

2323

24-
def get_colorized_routing_key():
25-
26-
"""Returns a formatted the routing key based on version info"""
27-
28-
ver_colour = "red"
29-
queue = "Unknown"
30-
31-
if settings["app"]["disable_version_constrain"]:
32-
33-
ver_colour = "yellow"
34-
queue = "celery"
35-
36-
else:
37-
ver_colour = "green" if settings["version_info"]["is_latest"] else "yellow"
38-
queue = settings["version_info"]["commit_short_sha"]
39-
40-
return f"[{ver_colour}]'{queue}'[/]"
41-
42-
4324
# Init classes
4425
console = Console()
4526
settings = SettingsManager()
@@ -67,8 +48,6 @@ def queue():
6748
)
6849
print("\n")
6950

70-
logger.info(f"[cyan]Routing to queue: {get_colorized_routing_key()}\n")
71-
7251
from ..queuer import queue
7352

7453
queue.main()
@@ -187,7 +166,6 @@ def init():
187166
github_url=settings["app"]["update_check_url"],
188167
package_name="resolve_proxy_encoder",
189168
)
190-
191169
settings.update({"version_info": version_info})
192170

193171
# Check for online workers to pass to other checks
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

resolve_proxy_encoder/queuer/handlers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ def get_newest_proxy_file(media, expected_proxy_path: str) -> Union[str, None]:
240240
matching_proxy_files = glob.glob(expected_proxy_path + "*.*")
241241

242242
if not len(matching_proxy_files):
243-
logger.info(
243+
logger.debug(
244244
f"[yellow]No existing proxies matched for '{media['file_name']}'\n"
245245
)
246246
return None
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)