From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Thu, 22 Mar 2018 22:36:54 +0300 From: Konstantin Osipov Subject: Re: [tarantool-patches] [PATCH 2/3] console: do not use netbox for console text connections Message-ID: <20180322193654.GB18129@atlas> References: <0c219168ea51252e15d683639e09cf95bc1c2b88.1521745741.git.v.shpilevoy@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0c219168ea51252e15d683639e09cf95bc1c2b88.1521745741.git.v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org Cc: vdavydov.dev@gmail.com, Vladislav Shpilevoy List-ID: * Vladislav Shpilevoy [18/03/22 22:18]: > Netbox console support complicates both netbox and console. Lets > use sockets directly for text protocol. > > Part of #2677 > --- > src/box/lua/console.lua | 178 +++++++++++++++++++++++++++++++++++++++--------- > 1 file changed, 146 insertions(+), 32 deletions(-) > > diff --git a/src/box/lua/console.lua b/src/box/lua/console.lua > index d49cf42be..19ff12876 100644 > --- a/src/box/lua/console.lua > +++ b/src/box/lua/console.lua > @@ -8,6 +8,9 @@ local log = require('log') > local errno = require('errno') > local urilib = require('uri') > local yaml = require('yaml') > +local net_box = require('net.box') > + > +local YAML_TERM = '\n...\n' > > -- admin formatter must be able to encode any Lua variable > local formatter = yaml.new() > @@ -29,7 +32,7 @@ local function format(status, ...) > if status then > local count = select('#', ...) > if count == 0 then > - return "---\n...\n" > + return "---"..YAML_TERM Why did you do this? The rest of the patch seems to be fine. -- Konstantin Osipov, Moscow, Russia, +7 903 626 22 32 http://tarantool.org - www.twitter.com/kostja_osipov