修改:使用 数据库配置定时调度,配置变更发送指令重新加载

git-svn-id: svn://47.119.165.148/zhub@67 e63fbceb-bcc3-4977-ac22-735b83d8d0f4
This commit is contained in:
lxy
2021-01-12 10:56:22 +00:00
parent 3d380e9353
commit 080d9be53b
7 changed files with 107 additions and 27 deletions

View File

@@ -144,9 +144,13 @@ func (c *Client) Daly(topic string, message string, daly int) error {
return nil
}
func (c *Client) Timer(topic string, expr string, fun func()) {
/*func (c *Client) Timer(topic string, expr string, fun func()) {
c.timerFun[topic] = fun
c.send("timer", topic, expr, "x")
}*/
func (c *Client) Timer(topic string, fun func()) {
c.timerFun[topic] = fun
c.send("timer", topic)
}
func (c *Client) TimerSingle(topic string, expr string, fun func()) {
c.timerFun[topic] = fun
@@ -158,6 +162,11 @@ func (c *Client) timer(topic string) {
c.send("timer", topic)
}
// send cmd
func (c *Client) Cmd(cmd string) {
c.send("cmd", cmd)
}
/*
// subscribe topic
---