mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-13 07:27:43 +00:00
Tweak stuck notifications a bit mroe
This commit is contained in:
parent
af592c446f
commit
adbaeb9e54
1 changed files with 13 additions and 2 deletions
|
@ -179,7 +179,11 @@ func (snc *stuckNotificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
break
|
||||
}
|
||||
|
||||
things, err := rac.MessageInbox(snc, reddit.WithQuery("after", account.LastMessageID))
|
||||
if kind == "t4" {
|
||||
return
|
||||
}
|
||||
|
||||
sthings, err := rac.MessageInbox(snc)
|
||||
if err != nil {
|
||||
snc.logger.WithFields(logrus.Fields{
|
||||
"err": err,
|
||||
|
@ -187,7 +191,14 @@ func (snc *stuckNotificationsConsumer) Consume(delivery rmq.Delivery) {
|
|||
return
|
||||
}
|
||||
|
||||
if things.Count == 0 {
|
||||
found := false
|
||||
for _, sthing := range sthings.Children {
|
||||
if sthing.FullName() == account.LastMessageID {
|
||||
found = true
|
||||
}
|
||||
}
|
||||
|
||||
if !found {
|
||||
snc.logger.WithFields(logrus.Fields{
|
||||
"account#username": account.NormalizedUsername(),
|
||||
"thing#id": account.LastMessageID,
|
||||
|
|
Loading…
Reference in a new issue