Skip to content

Commit

Permalink
temp: skip compute_check_run
Browse files Browse the repository at this point in the history
This is now run in the same webhook handler that creates the check run.
  • Loading branch information
jonathansick committed Jun 20, 2022
1 parent 8d94986 commit 869c5fc
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions src/timessquare/worker/functions/compute_check_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

from typing import Any, Dict

from safir.dependencies.db_session import db_session_dependency

from timessquare.domain.githubwebhook import GitHubCheckRunEventModel
from timessquare.worker.servicefactory import create_github_repo_service

# from safir.dependencies.db_session import db_session_dependency

# from timessquare.worker.servicefactory import create_github_repo_service


async def compute_check_run(
Expand All @@ -20,14 +21,15 @@ async def compute_check_run(
github_repo=payload.repository.name,
)
logger.info("Running compute_check_run")
logger.info("Skipping")

async for db_session in db_session_dependency():
github_repo_service = await create_github_repo_service(
http_client=ctx["http_client"],
logger=logger,
installation_id=payload.installation.id,
db_session=db_session,
)
async with db_session.begin():
await github_repo_service.compute_check_run(payload=payload)
# async for db_session in db_session_dependency():
# github_repo_service = await create_github_repo_service(
# http_client=ctx["http_client"],
# logger=logger,
# installation_id=payload.installation.id,
# db_session=db_session,
# )
# async with db_session.begin():
# await github_repo_service.compute_check_run(payload=payload)
return "done"

0 comments on commit 869c5fc

Please sign in to comment.