MCPcopy
hub / github.com/scrapy/scrapy / _slot_gc

Method _slot_gc

scrapy/core/downloader/__init__.py:269–273  ·  view source on GitHub ↗
(self, age: float = 60)

Source from the content-addressed store, hash-verified

267 slot.close()
268
269 def _slot_gc(self, age: float = 60) -> None:
270 mintime = monotonic() - age
271 for key, slot in list(self.slots.items()):
272 if not slot.active and slot.lastseen + slot.delay < mintime:
273 self.slots.pop(key).close()
274
275 def _start_slot_gc(self) -> None:
276 if self._slot_gc_loop:

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.80
closeMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected