From a613eed874da53ce3add55d561bab08e86e9aea5 Mon Sep 17 00:00:00 2001 From: Ayo Ayibiowu Date: Wed, 27 Mar 2024 01:31:44 +0100 Subject: [PATCH] chore: adds job for building and publishing container image --- Makefile | 12 ++++++++++++ sage/utils/loaders.py | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index cc3084e..655fa6e 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,18 @@ spell_check: spell_fix: poetry run codespell --toml pyproject.toml -w + +###################### +# BUILDING AND PUBLISHING +###################### + +TAG?=latest +build: + docker build -t thehapyone/codesage:$(TAG) . + +deploy: + docker push thehapyone/codesage:$(TAG) + ###################### # HELP ###################### diff --git a/sage/utils/loaders.py b/sage/utils/loaders.py index c319301..9e74f1b 100644 --- a/sage/utils/loaders.py +++ b/sage/utils/loaders.py @@ -420,12 +420,12 @@ async def parse_links(text: str, url: str, depth: int): async def worker(): """Worker node for fetching all urls""" - tasks_tacker = 0 + tasks_tracker = 0 while not tasks.empty(): current_tasks = [] while not tasks.empty(): current_tasks.append(await tasks.get()) - tasks_tacker = tasks_tacker + 1 + tasks_tracker = tasks_tracker + 1 fetch_results = await asyncio.gather(*current_tasks) parse_child_tasks = [ @@ -436,7 +436,7 @@ async def worker(): await asyncio.gather(*parse_child_tasks) # mark all tasks as done - for _ in range(tasks_tacker): + for _ in range(tasks_tracker): tasks.task_done() # Configures a semaphore for concurrency