mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-02 19:57:42 +08:00
Merge branch 'master' of https://github.com/goodrain/rainbond
This commit is contained in:
commit
fd1d4a96d0
@ -23,6 +23,7 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
api_db "github.com/goodrain/rainbond/api/db"
|
||||
"github.com/goodrain/rainbond/mq/api/grpc/client"
|
||||
"github.com/goodrain/rainbond/worker/discover"
|
||||
"github.com/pquerna/ffjson/ffjson"
|
||||
)
|
||||
|
||||
@ -36,7 +37,7 @@ func sendTask(body map[string]interface{}, taskType string, mqClient *client.MQC
|
||||
TaskBody: bodyJ,
|
||||
User: "define",
|
||||
}
|
||||
eq, errEq := api_db.BuildTaskBuild(bs)
|
||||
eq, errEq := api_db.BuildTaskBuildWithTopic(bs, discover.WTOPIC)
|
||||
if errEq != nil {
|
||||
logrus.Errorf("build equeue stop request error, %v", errEq)
|
||||
return errEq
|
||||
|
@ -127,6 +127,13 @@ func NewTaskBody(taskType string, body []byte) TaskBody {
|
||||
return nil
|
||||
}
|
||||
return b
|
||||
case "apply_rule":
|
||||
b := ApplyRuleTaskBody{}
|
||||
err := ffjson.Unmarshal(body, &b)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return b
|
||||
default:
|
||||
return DefaultTaskBody{}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user