Commit 259d02a463
Verified · cmc
Layout: unified · split
src/srht_contrib/services/git.py +6 −2
| @@ -8,7 +8,7 @@ from typing import Any | ||
| 8 | 8 | |
| 9 | 9 | from srht_contrib.config import Settings |
| 10 | 10 | from srht_contrib.schemas import NormalizedEvent |
| 11 | from srht_contrib.services.srht_client import SourceHutGraphQLClient | |
| 11 | from srht_contrib.services.srht_client import SourceHutClientError, SourceHutGraphQLClient | |
| 12 | 12 | from srht_contrib.services.types import BackfillBatchResult |
| 13 | 13 | from srht_contrib.utils.dates import ensure_utc, parse_datetime |
| 14 | 14 | from srht_contrib.utils.identity import ActorIdentityResolver |
| @@ -97,7 +97,11 @@ class GitIngestionService: | ||
| 97 | 97 | events: list[NormalizedEvent] = [] |
| 98 | 98 | for repository in discovered_repositories: |
| 99 | 99 | owner, repo_name = self._split_repository(actor, repository) |
| 100 | repo_events = self._fetch_repository_commits(actor=actor, owner=owner, repo_name=repo_name, since=since_dt) | |
| 100 | try: | |
| 101 | repo_events = self._fetch_repository_commits(actor=actor, owner=owner, repo_name=repo_name, since=since_dt) | |
| 102 | except SourceHutClientError: | |
| 103 | logger.warning("git poll skipped repository=%s/%s due to GraphQL error", owner, repo_name, exc_info=True) | |
| 104 | continue | |
| 101 | 105 | events.extend(repo_events) |
| 102 | 106 | |
| 103 | 107 | logger.info("git poll complete for actor=%s normalized_events=%s", actor, len(events)) |