From 4969d7ba610ebf1fa482acce77ca9868bbbaea3e Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Aug 2017 01:10:29 +0530 Subject: [PATCH] Fix various bits of bad logging and hard-wired timeouts. --- econtext/core.py | 8 ++++---- econtext/master.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/econtext/core.py b/econtext/core.py index c741844b..e1328ad2 100644 --- a/econtext/core.py +++ b/econtext/core.py @@ -31,7 +31,7 @@ import zlib LOG = logging.getLogger('econtext') IOLOG = logging.getLogger('econtext.io') -#IOLOG.setLevel(logging.INFO) +IOLOG.setLevel(logging.INFO) GET_MODULE = 100 CALL_FUNCTION = 101 @@ -682,7 +682,7 @@ class IoLogger(BasicStream): self.transmit_side.close() def on_receive(self, broker): - LOG.debug('%r.on_receive()', self) + IOLOG.debug('%r.on_receive()', self) buf = os.read(self.receive_side.fd, CHUNK_SIZE) if not buf: return self.on_disconnect(broker) @@ -727,7 +727,7 @@ class Router(object): context.on_shutdown() def add_route(self, target_id, via_id): - LOG.info('add_route(%r, %r)', target_id, via_id) + LOG.debug('%r.add_route(%r, %r)', self, target_id, via_id) try: self._stream_by_id[target_id] = self._stream_by_id[via_id] except KeyError: @@ -754,7 +754,7 @@ class Router(object): stream = self._stream_by_id.get(msg.dst_id) if stream is None: - LOG.error('%r: no route for %r', self, msg) + LOG.error('%r: no route for %r, my ID is %r', self, msg, econtext.context_id) return stream.send(msg) diff --git a/econtext/master.py b/econtext/master.py index e23ba168..86f20608 100644 --- a/econtext/master.py +++ b/econtext/master.py @@ -456,7 +456,7 @@ class Router(econtext.core.Router): def proxy_connect(self, via_context, klass, name=None, **kwargs): context_id = self.alloc_slave_id() - name = via_context.call_with_deadline(3.0, True, + name = via_context.call_with_deadline(None, True, _proxy_connect, name, context_id, klass, kwargs ) name = '%s.%s' % (via_context.name, name)