Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions scrapinghub/client/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,17 @@ 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
``'<project_id>/<spider_id>'``. *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.

: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.
:return: a generator object over a list of dictionaries of jobs summary
for a given filter params.
:rtype: :class:`types.GeneratorType[dict]`
Expand Down
Loading