|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package db
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"Open_IM/pkg/common/config"
|
|
|
|
|
"Open_IM/pkg/common/constant"
|
|
|
|
|
log2 "Open_IM/pkg/common/log"
|
|
|
|
|
pbChat "Open_IM/pkg/proto/chat"
|
|
|
|
@ -274,7 +275,7 @@ func (d *DataBases) SetMessageToCache(msgList []*pbChat.MsgDataToMQ, uid string)
|
|
|
|
|
continue
|
|
|
|
|
}
|
|
|
|
|
log2.NewDebug("", "m", m)
|
|
|
|
|
_, err = d.Exec("hmset", key, redis.Args{}.Add().AddFlat(m)...)
|
|
|
|
|
_, err = d.Exec("hmset", key, redis.Args{}.Add("TIMEOUT", config.Config.MsgCacheTimeout).AddFlat(m)...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
log2.NewWarn("", utils.GetSelfFuncName(), "redis failed", "args:", key, *msg, uid, m)
|
|
|
|
|
failedList = append(failedList, *msg)
|
|
|
|
|