1
0
mirror of https://shylinux.com/x/icebergs synced 2025-04-25 17:18:05 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2024-02-21 20:40:40 +08:00
parent ef91a31480
commit 48f2322d0c
2 changed files with 9 additions and 4 deletions

View File

@ -194,8 +194,8 @@ func _space_echo(m *ice.Message, source, target []string, c *websocket.Conn) {
}
func _space_send(m *ice.Message, name string, arg ...string) (h string) {
withecho := true
kit.If(len(arg) > 0 && arg[0] == "toast", func() { withecho = false; m.Option(ice.MSG_DEBUG, ice.FALSE) })
wait, done := m.Wait(kit.Select("", m.OptionDefault("space.timeout", "300s"), withecho), func(msg *ice.Message, arg ...string) {
kit.If(len(arg) > 0 && arg[0] == TOAST, func() { withecho = false; m.Option(ice.MSG_DEBUG, ice.FALSE) })
wait, done := m.Wait(kit.Select("", m.OptionDefault("space.timeout", "600s"), withecho), func(msg *ice.Message, arg ...string) {
m.Cost(kit.Format("%v->[%v] %v %v", m.Optionv(ice.MSG_SOURCE), name, m.Detailv(), msg.FormatSize())).Copy(msg)
})
if withecho {
@ -329,7 +329,12 @@ func init() {
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, MASTER))
} else {
m.OptionDefault(ice.MSG_USERPOD, arg[0])
_space_send(m, arg[0], kit.Simple(kit.Split(arg[1]), arg[2:])...)
for i := 0; i < 5; i++ {
if _space_send(m, arg[0], kit.Simple(kit.Split(arg[1]), arg[2:])...); !m.IsErrNotFound() {
break
}
m.SetAppend().SetResult().Sleep3s()
}
}
}},
})

View File

@ -53,7 +53,7 @@ func _xterm_get(m *ice.Message, h string) xterm.XTerm {
}
func _xterm_echo(m *ice.Message, h string, str string) {
m.Options(ice.MSG_DAEMON, mdb.HashSelectField(m, h, cli.DAEMON), ice.MSG_COUNT, "0")
// m.Options(ice.LOG_DISABLE, ice.TRUE)
m.Options(ice.LOG_DISABLE, ice.TRUE)
web.PushNoticeGrow(m, h, str)
}
func _xterm_cmds(m *ice.Message, h string, cmd string, arg ...ice.Any) {