diff --git a/swh/lister/github/lister.py b/swh/lister/github/lister.py index 011ff3c..986f3d6 100644 --- a/swh/lister/github/lister.py +++ b/swh/lister/github/lister.py @@ -213,3 +213,10 @@ class GitHubLister(Lister[GitHubListerState, List[Dict[str, Any]]]): # the current run is higher than that stored in the database. if self.state.last_seen_id > scheduler_state.last_seen_id: self.updated = True + + def set_state_in_scheduler( + self, with_listing_finished_date: bool = False, force_state: bool = False + ) -> None: + # github range lister should not override shared incremental lister state + if not self.relisting: + super().set_state_in_scheduler(with_listing_finished_date, force_state) diff --git a/swh/lister/github/tests/test_lister.py b/swh/lister/github/tests/test_lister.py index ba7e37e..20717fe 100644 --- a/swh/lister/github/tests/test_lister.py +++ b/swh/lister/github/tests/test_lister.py @@ -135,6 +135,7 @@ def test_relister(swh_scheduler, caplog, requests_mocker) -> None: # Check that the relisting mode hasn't touched the stored state. lister_data = get_lister_data(swh_scheduler) assert lister_data.current_state == {"last_seen_id": 123} + assert lister_data.last_listing_finished_at is None def test_anonymous_ratelimit(