From c7f31ec47e73e4fa3dccbd74bb164bd4166ed779 Mon Sep 17 00:00:00 2001 From: Adrian Chaves Date: Mon, 28 Sep 2026 11:54:03 +0200 Subject: [PATCH 1/2] Document the start, start_after and count parameters of Jobs.iter_last --- scrapinghub/client/jobs.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/scrapinghub/client/jobs.py b/scrapinghub/client/jobs.py index 75d0acbc..66aba643 100644 --- a/scrapinghub/client/jobs.py +++ b/scrapinghub/client/jobs.py @@ -357,12 +357,15 @@ def iter_last(self, start=None, start_after=None, count=None, spider=None, **params): """Iterate through last jobs for each spider. - :param start: (optional) - :param start_after: (optional) - :param count: (optional) - :param spider: (optional) a spider name (not needed if instantiated - with :class:`~scrapinghub.client.spiders.Spider`). - :param params: (optional) additional keyword args. + Spiders are iterated in key order, where a spider key is + ``'/'``. *start* is the key of the first spider + to include, *start_after* the key of the spider after which to start, + and *count* the maximum number of spiders to return. + + *spider* is a spider name, not needed if instantiated with + :class:`~scrapinghub.client.spiders.Spider`. *params* are additional + keyword arguments. + :return: a generator object over a list of dictionaries of jobs summary for a given filter params. :rtype: :class:`types.GeneratorType[dict]` From 1b6bef524794284bac8ed9ea6c4a3a82b1559525 Mon Sep 17 00:00:00 2001 From: Adrian Chaves Date: Mon, 28 Sep 2026 12:18:01 +0200 Subject: [PATCH 2/2] Say iter_last returns the most recent job of each spider --- scrapinghub/client/jobs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapinghub/client/jobs.py b/scrapinghub/client/jobs.py index 66aba643..62053ac4 100644 --- a/scrapinghub/client/jobs.py +++ b/scrapinghub/client/jobs.py @@ -355,7 +355,7 @@ def summary(self, state=None, spider=None, **params): def iter_last(self, start=None, start_after=None, count=None, spider=None, **params): - """Iterate through last jobs for each spider. + """Iterate over the most recent job of each spider. Spiders are iterated in key order, where a spider key is ``'/'``. *start* is the key of the first spider