Commit 524692dd by mushishixian

精简

parent f2e40aae
...@@ -51,6 +51,7 @@ func initLog() { ...@@ -51,6 +51,7 @@ func initLog() {
func initDB() { func initDB() {
dsn := util.Configs.Liexin_databases.Dns dsn := util.Configs.Liexin_databases.Dns
specialDsn := util.Configs.Special_databases.Dns specialDsn := util.Configs.Special_databases.Dns
//engine.GetLogger().
engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn}) engine, err = gorose.Open(&gorose.Config{Driver: "mysql", Dsn: dsn})
if err != nil { if err != nil {
panic(err) panic(err)
......
...@@ -79,7 +79,7 @@ type RecvPro struct { ...@@ -79,7 +79,7 @@ type RecvPro struct {
func (t *RecvPro) Consumer(dataByte []byte) (err error) { func (t *RecvPro) Consumer(dataByte []byte) (err error) {
var viewData model.ViewData var viewData model.ViewData
fmt.Println(string(dataByte)) //fmt.Println(string(dataByte))
if err = json.Unmarshal(dataByte, &viewData); err != nil { if err = json.Unmarshal(dataByte, &viewData); err != nil {
logger.Error(err.Error()) logger.Error(err.Error())
return return
...@@ -203,7 +203,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) { ...@@ -203,7 +203,7 @@ func (t *RecvPro) Consumer(dataByte []byte) (err error) {
} }
func (t *RecvPro) FailAction(dataByte []byte) error { func (t *RecvPro) FailAction(dataByte []byte) error {
fmt.Println("任务处理失败了,发送钉钉消息通知主人") fmt.Println("任务处理失败了,数据是 : " + string(dataByte))
return nil return nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment