mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-21 05:13:16 +00:00
engine.stop() is now always executed when reactor stops
--HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%4045
This commit is contained in:
parent
6bdbcd8173
commit
648b312bca
@ -121,6 +121,7 @@ class ExecutionEngine(object):
|
||||
reactor.listenTCP(*args, **kwargs)
|
||||
self.running = True
|
||||
reactor.run() # blocking call
|
||||
self.stop()
|
||||
|
||||
def stop(self):
|
||||
"""Stop the execution engine"""
|
||||
@ -134,7 +135,8 @@ class ExecutionEngine(object):
|
||||
self.tasks = []
|
||||
for p in [p for p in self.ports if not isinstance(p, tuple)]:
|
||||
p.stopListening()
|
||||
reactor.stop()
|
||||
if reactor.running:
|
||||
reactor.stop()
|
||||
signals.send_catch_log(signal=signals.engine_stopped, sender=self.__class__)
|
||||
|
||||
def pause(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user