MCPcopy Create free account
hub / github.com/apify/crawlee-python / mark_good

Method mark_good

src/crawlee/sessions/_session.py:193–202  ·  view source on GitHub ↗

Mark the session as good. Should be called after a successful session usage.

(self)

Source from the content-addressed store, hash-verified

191 return model
192
193 def mark_good(self) -> None:
194 """Mark the session as good. Should be called after a successful session usage."""
195 self._usage_count += 1
196
197 if self._error_score > 0:
198 self._error_score = max(0, self._error_score - self._error_score_decrement)
199
200 # Retire the session if it is not usable anymore
201 if not self.is_usable:
202 self.retire()
203
204 def mark_bad(self) -> None:
205 """Mark the session as bad after an unsuccessful session usage."""

Callers 15

__run_task_functionMethod · 0.80
test_mark_goodFunction · 0.80
test_multiple_marksFunction · 0.80
default_handlerFunction · 0.80
default_handlerFunction · 0.80
mainFunction · 0.80
default_handlerFunction · 0.80
default_handlerFunction · 0.80
default_handlerFunction · 0.80
default_handlerFunction · 0.80
default_handlerFunction · 0.80

Calls 1

retireMethod · 0.95

Tested by 3

test_mark_goodFunction · 0.64
test_multiple_marksFunction · 0.64