mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-25 15:24:15 +00:00
PY3 fix downloader slots GC
This commit is contained in:
parent
a35aec71e9
commit
f9dc02e23a
@ -194,6 +194,6 @@ class Downloader(object):
|
|||||||
|
|
||||||
def _slot_gc(self, age=60):
|
def _slot_gc(self, age=60):
|
||||||
mintime = time() - age
|
mintime = time() - age
|
||||||
for key, slot in self.slots.items():
|
for key, slot in list(self.slots.items()):
|
||||||
if not slot.active and slot.lastseen + slot.delay < mintime:
|
if not slot.active and slot.lastseen + slot.delay < mintime:
|
||||||
self.slots.pop(key).close()
|
self.slots.pop(key).close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user