mirror of https://github.com/scrapy/scrapy.git
use DelayedCall.active() instead DelayedCall.called, to support cancelled tasks
This commit is contained in:
parent
88417a3ed1
commit
c0f1c8de04
|
|
@ -40,5 +40,5 @@ class CloseSpider(object):
|
|||
def spider_closed(self, spider):
|
||||
self.counts.pop(spider, None)
|
||||
tsk = self.tasks.pop(spider, None)
|
||||
if tsk and not tsk.called:
|
||||
if tsk and tsk.active():
|
||||
tsk.cancel()
|
||||
|
|
|
|||
Loading…
Reference in New Issue