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 | from srht_contrib.config import Settings | 9 | from srht_contrib.config import Settings |
| 10 | from srht_contrib.schemas import NormalizedEvent | 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 | from srht_contrib.services.types import BackfillBatchResult | 12 | from srht_contrib.services.types import BackfillBatchResult |
| 13 | from srht_contrib.utils.dates import ensure_utc, parse_datetime | 13 | from srht_contrib.utils.dates import ensure_utc, parse_datetime |
| 14 | from srht_contrib.utils.identity import ActorIdentityResolver | 14 | from srht_contrib.utils.identity import ActorIdentityResolver |
| @@ -97,7 +97,11 @@ class GitIngestionService: | |||
| 97 | events: list[NormalizedEvent] = [] | 97 | events: list[NormalizedEvent] = [] |
| 98 | for repository in discovered_repositories: | 98 | for repository in discovered_repositories: |
| 99 | owner, repo_name = self._split_repository(actor, repository) | 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 | events.extend(repo_events) | 105 | events.extend(repo_events) |
| 102 | 106 | ||
| 103 | logger.info("git poll complete for actor=%s normalized_events=%s", actor, len(events)) | 107 | logger.info("git poll complete for actor=%s normalized_events=%s", actor, len(events)) |