def stop(self): self.port.stopListening() for name, signal in vars(signals).items(): if not name.startswith('_'): disconnect_all(signal) self.crawler.uninstall() self.deferred.callback(None)
def stop(self): self.port.stopListening() # FIXME: wait for this Deferred for name, signal in vars(signals).items(): if not name.startswith('_'): disconnect_all(signal) self.deferred.callback(None) return self.crawler.stop()
def disconnect_all(self, signal, **kwargs): """ Disconnect all receivers from the given signal. :param signal: the signal to disconnect from :type signal: object """ kwargs.setdefault('sender', self.sender) return _signal.disconnect_all(signal, **kwargs)
def tearDown(self): for name, signal in vars(signals).items(): if not name.startswith('_'): disconnect_all(signal)
def disconnect_all(self, *a, **kw): kw.setdefault('sender', self.sender) return signal.disconnect_all(*a, **kw)
def tearDown(self): for name, signal in vars(signals).items(): if not name.startswith('_'): disconnect_all(signal) self.pipe.close_spider(self.spider)