Skip to content

Commit

Permalink
feat(task): auto remove error subscribe
Browse files Browse the repository at this point in the history
  • Loading branch information
indes committed Oct 20, 2019
1 parent 5262435 commit 8460065
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bot/service.go
Expand Up @@ -117,7 +117,8 @@ func BroadNews(source *model.Source, subs []model.Subscribe, contents []model.Co
DisableNotification: disableNotification,
})
if err != nil {
log.Println(err)
log.Println(err, " [unsubscribe]")
_ = sub.Unsub()
}
} else {
message = `
Expand Down Expand Up @@ -146,7 +147,8 @@ func BroadNews(source *model.Source, subs []model.Subscribe, contents []model.Co
DisableNotification: disableNotification,
})
if err != nil {
log.Println(err)
log.Println(err, " [unsubscribe]")
_ = sub.Unsub()
}
}
}
Expand Down

0 comments on commit 8460065

Please sign in to comment.