chore(NSQ): remove nsq package and update run func (#614)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
@@ -254,7 +254,12 @@ func CheckPushConf(cfg config.ConfYaml) error {
|
||||
|
||||
// SendNotification send notification
|
||||
func SendNotification(req queue.QueuedMessage) {
|
||||
v, _ := req.(*PushNotification)
|
||||
v, ok := req.(*PushNotification)
|
||||
if !ok {
|
||||
if err := json.Unmarshal(req.Bytes(), v); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
defer func() {
|
||||
v.WaitDone()
|
||||
@@ -269,3 +274,9 @@ func SendNotification(req queue.QueuedMessage) {
|
||||
PushToHuawei(*v)
|
||||
}
|
||||
}
|
||||
|
||||
// Run send notification
|
||||
var Run = func(msg queue.QueuedMessage) error {
|
||||
SendNotification(msg)
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user