def _run(self):
self._begin()
while True:
event = None
try:
event = self._pop()
except OSError, e:
if e.errno == errno.EIO: # dropped SSH connection? start over
self._kill_ssh()
self._begin()
continue
except ConnectionClosed: # dropped SSH connection? start over
self._kill_ssh()
self._begin()
continue
try:
event = json.loads(event)
except Exception, e:
print 'GES WARNING: %s' % e
continue
if self.pipe:
self.pipe.put(event)
if self.mailbox:
try:
self.mailbox.put_gerrit_event(event)
except Exception, e:
if str(e).startswith('project not tracked by heimdall'):
pass
elif str(e).startswith('ignoring'):
pass
else:
print 'GES WARNING:', e
评论列表
文章目录