Skip to content

Commit

Permalink
add logs (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrian-codecov authored May 24, 2024
1 parent 9cbe122 commit e18b4ff
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions tasks/backfill_existing_gh_app_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,15 @@ def run_impl(
owner_service=owner_service,
gh_app_installation=gh_app_installation,
)
log.info("Successful backfill", extra=dict(ownerid=ownerid))
log.info(
"Successful backfill",
extra=dict(ownerid=ownerid, parent_id=self.request.parent_id),
)
return {"successful": True, "reason": "backfill task finished"}
except:
log.info(
"Backfill unsuccessful for this owner", extra=dict(ownerid=ownerid)
"Backfill unsuccessful for this owner",
extra=dict(ownerid=ownerid, parent_id=self.request.parent_id),
)
return {"successful": False, "reason": "backfill unsuccessful"}

Expand Down
10 changes: 7 additions & 3 deletions tasks/backfill_owners_without_gh_app_installations.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def run_impl(
# Create new GH app installation and add all repos the gh app has access to
log.info(
"This owner has no Github App Installation",
extra=dict(ownerid=ownerid),
extra=dict(ownerid=ownerid, parent_id=self.request.parent_id),
)
gh_app_installation = GithubAppInstallation(
owner=owner,
Expand All @@ -195,11 +195,15 @@ def run_impl(
owner_service=owner_service,
gh_app_installation=gh_app_installation,
)
log.info("Successful backfill", extra=dict(ownerid=ownerid))
log.info(
"Successful backfill",
extra=dict(ownerid=ownerid, parent_id=self.request.parent_id),
)
return {"successful": True, "reason": "backfill task finished"}
except:
log.info(
"Backfill unsuccessful for this owner", extra=dict(ownerid=ownerid)
"Backfill unsuccessful for this owner",
extra=dict(ownerid=ownerid, parent_id=self.request.parent_id),
)
return {"successful": False, "reason": "backfill unsuccessful"}

Expand Down

0 comments on commit e18b4ff

Please sign in to comment.