Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion augur/tasks/init/celery_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,14 @@ def augur_handle_task_failure(self,exc,task_id,repo_git,logger_name,collection_h

with get_session() as session:
logger.info(f"Repo git: {repo_git}")
repo = session.query(Repo).filter(Repo.repo_git == repo_git).one()
repo = session.query(Repo).filter(Repo.repo_git == repo_git).one_or_none()

if repo is None:
logger.warning(
f"Repo with git url {repo_git} not found during failure handling "
f"(it may have been renamed); skipping status update."
)
return

repoStatus = repo.collection_status[0]

Expand Down
Loading