Fixed bug with deferred spider queues. Closes #288

This commit is contained in:
Pablo Hoffman 2010-11-16 02:36:18 -02:00
parent 7698ff2a7b
commit 5ded8251d2
1 changed files with 2 additions and 1 deletions

View File

@ -16,12 +16,13 @@ class ExecutionQueue(object):
self._queue = queue
self._keepalive = keep_alive
@defer.inlineCallbacks
def _append_next(self):
"""Called when there are no more items left in self.spider_requests.
This method is meant to be overriden in subclasses to add new (spider,
requests) tuples to self.spider_requests. It can return a Deferred.
"""
msg = self._queue.pop()
msg = yield self._queue.pop()
if msg:
name = msg.pop('name')
msg = stringify_dict(msg) # see #250