From 67e5d07a138695e37c7560e539811f0730b798fb Mon Sep 17 00:00:00 2001 From: shaoying Date: Thu, 25 Feb 2021 07:53:08 +0800 Subject: [PATCH] opt some --- base/ssh/scripts.go | 3 ++- base/web/space.go | 2 +- core/code/publish.go | 8 ++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/base/ssh/scripts.go b/base/ssh/scripts.go index 38ad6cd3..ea8f1640 100644 --- a/base/ssh/scripts.go +++ b/base/ssh/scripts.go @@ -111,7 +111,7 @@ func (f *Frame) prompt(m *ice.Message, list ...string) *Frame { list = append(list, f.ps1...) } - m.Sleep("10ms") + m.Sleep("30ms") fmt.Fprintf(f.stdout, "\r") for _, v := range list { switch v { @@ -241,6 +241,7 @@ func (f *Frame) scan(m *ice.Message, h, line string, r io.Reader) *Frame { m.I, m.O = r, f.stdout bio := bufio.NewScanner(r) + m.Sleep("3s") for f.prompt(m, ps...); bio.Scan() && !f.exit; f.prompt(m, ps...) { if h == STDIO && len(bio.Text()) == 0 { continue // 空行 diff --git a/base/web/space.go b/base/web/space.go index bca8062d..e73480ac 100644 --- a/base/web/space.go +++ b/base/web/space.go @@ -174,7 +174,7 @@ func _space_handle(m *ice.Message, safe bool, send map[string]*ice.Message, c *w } } else { // 接收响应 - m.Debug("what %v", 123) + m.Sleep("30ms") res.Back(msg) } } diff --git a/core/code/publish.go b/core/code/publish.go index 0d1d8c4f..f2c400c3 100644 --- a/core/code/publish.go +++ b/core/code/publish.go @@ -119,16 +119,16 @@ func init() { var _contexts = kit.Dict( "tmux", `# 终端环境 -export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp +export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp `, "base", `# 生产环境 -export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp ice +export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp ice `, "miss", `# 开发环境 -export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp dev +export ctx_dev={{.Option "httphost"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp dev `, "tool", `# 群组环境 mkdir contexts; cd contexts -export ctx_log=/dev/stdout ctx_dev={{.Option "httphost"}} ctx_river={{.Option "sess.river"}} ctx_share={{.Option "share"}} ctx_temp=$(mktemp); curl -sL $ctx_dev >$ctx_temp; source $ctx_temp ice +export ctx_log=/dev/stdout ctx_dev={{.Option "httphost"}} ctx_river={{.Option "sess.river"}} ctx_share={{.Option "share"}} ctx_temp=$(mktemp); curl -fsSL $ctx_dev -o $ctx_temp; source $ctx_temp ice `, )