mirror of
https://shylinux.com/x/icebergs
synced 2025-04-26 09:34:05 +08:00
add some
This commit is contained in:
parent
ef91a31480
commit
48f2322d0c
@ -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) {
|
func _space_send(m *ice.Message, name string, arg ...string) (h string) {
|
||||||
withecho := true
|
withecho := true
|
||||||
kit.If(len(arg) > 0 && arg[0] == "toast", func() { withecho = false; m.Option(ice.MSG_DEBUG, ice.FALSE) })
|
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) {
|
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)
|
m.Cost(kit.Format("%v->[%v] %v %v", m.Optionv(ice.MSG_SOURCE), name, m.Detailv(), msg.FormatSize())).Copy(msg)
|
||||||
})
|
})
|
||||||
if withecho {
|
if withecho {
|
||||||
@ -329,7 +329,12 @@ func init() {
|
|||||||
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, MASTER))
|
m.Sort("", kit.Simple(aaa.LOGIN, WEIXIN, PORTAL, WORKER, SERVER, MASTER))
|
||||||
} else {
|
} else {
|
||||||
m.OptionDefault(ice.MSG_USERPOD, arg[0])
|
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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
|
@ -53,7 +53,7 @@ func _xterm_get(m *ice.Message, h string) xterm.XTerm {
|
|||||||
}
|
}
|
||||||
func _xterm_echo(m *ice.Message, h string, str string) {
|
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.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)
|
web.PushNoticeGrow(m, h, str)
|
||||||
}
|
}
|
||||||
func _xterm_cmds(m *ice.Message, h string, cmd string, arg ...ice.Any) {
|
func _xterm_cmds(m *ice.Message, h string, cmd string, arg ...ice.Any) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user