Skip to content

Commit 2ff6b29

Browse files
committed
Document newcount for frontiers
1 parent 98f4e85 commit 2ff6b29

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scrapinghub/client/frontiers.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ def list(self):
111111

112112
@property
113113
def newcount(self):
114+
"""Amount of new entries added to all frontiers.
115+
116+
:return: amount of new entries
117+
:rtype: :class:`int`
118+
"""
114119
return sum(self._origin.newcount.values())
115120

116121

@@ -184,6 +189,11 @@ def flush(self):
184189

185190
@property
186191
def newcount(self):
192+
"""Amount of new entries added to frontier.
193+
194+
:return: amount of new entries
195+
:rtype: :class:`int`
196+
"""
187197
newcount_values = self._frontiers._origin.newcount
188198
return sum(v for (frontier, _), v in newcount_values.items()
189199
if frontier == self.key)
@@ -278,6 +288,11 @@ def flush(self):
278288

279289
@property
280290
def newcount(self):
291+
"""Amount of new entries added to slot.
292+
293+
:return: amount of new entries
294+
:rtype: :class:`int`
295+
"""
281296
newcount_values = self._frontier._frontiers._origin.newcount
282297
return newcount_values.get((self._frontier.key, self.key), 0)
283298

0 commit comments

Comments
 (0)