1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-23 21:44:19 +00:00

improved worker error logging for communication with master

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40336
This commit is contained in:
Pablo Hoffman 2008-10-23 12:41:49 +00:00
parent 005044b0d8
commit 215151dd86

View File

@ -140,7 +140,9 @@ class ClusterWorker(pb.Root):
self._master = None
log.msg("Lost connection to master", log.ERROR)
else:
deferred.addCallbacks(callback=lambda x: x, errback=lambda reason: log.msg(reason, log.ERROR))
def _eb(failure):
log.msg("Error received from ClusterMaster\n%s" % failure, level=log.ERROR)
deferred.addErrback(_eb)
def remote_set_master(self, master):
"""Set the master for this worker"""