Fix various bits of bad logging and hard-wired timeouts.

pull/35/head
David Wilson 8 years ago
parent 2d92455103
commit 4969d7ba61

@ -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)

@ -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)

Loading…
Cancel
Save