def create_node(conf, context, path, data, connection_pool): """Create a node with the given value as its data.""" pack_context(data, context) with ConnectionContext(conf, connection_pool) as conn: conn.create_node(path, zk_common.serialize_msg(data))
def put_message_in_queue(conf, context, queue, msg, connection_pool): """Sends a message on a queue without waiting for a response.""" LOG.debug(_('Making asynchronous put on %s...'), queue) pack_context(msg, context) with ConnectionContext(conf, connection_pool) as conn: conn.put_message_in_queue(context, queue, zk_common.serialize_msg(msg))