Skip to content

Commit

Permalink
chore: adds job for building and publishing container image
Browse files Browse the repository at this point in the history
  • Loading branch information
thehapyone committed Mar 27, 2024
1 parent 403b218 commit a613eed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
######################
Expand Down
6 changes: 3 additions & 3 deletions sage/utils/loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand All @@ -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
Expand Down

0 comments on commit a613eed

Please sign in to comment.