Allow CALL_FUNCTION from non-master context.

Just ensure CALL_FUNCTION return value is sent back to src_id/reply_to
rather than 0/reply_to.
pull/35/head
David Wilson 7 years ago
parent 73c82415aa
commit 7467fc2b0b

@ -1093,11 +1093,15 @@ class ExternalContext(object):
obj = getattr(obj, klass)
fn = getattr(obj, func)
ret = fn(*args, **kwargs)
self.master.send(Message.pickled(ret, handle=msg.reply_to))
self.router.route(
Message.pickled(ret, dst_id=msg.src_id, handle=msg.reply_to)
)
except Exception, e:
LOG.debug('_dispatch_calls: %s', e)
e = CallError(str(e))
self.master.send(Message.pickled(e, handle=msg.reply_to))
self.router.route(
Message.pickled(e, dst_id=msg.src_id, handle=msg.reply_to)
)
def main(self, parent_id, context_id, key, debug, log_level,
in_fd=100, out_fd=1, core_src_fd=101, setup_stdio=True):

Loading…
Cancel
Save