Cancel batch sending if there's nothing to send
This commit is contained in:
parent
5767138006
commit
f2927db865
1 changed files with 8 additions and 0 deletions
|
@ -243,6 +243,14 @@ func (portal *Portal) backfillSendBatch(ctx context.Context, converted []*Conver
|
|||
dbMessages = append(dbMessages, dbm)
|
||||
}
|
||||
}
|
||||
if len(dbMessages) == 0 {
|
||||
log.Warn().
|
||||
Int("converted_count", len(converted)).
|
||||
Int("event_count", len(events)).
|
||||
Int("db_count", len(dbMessages)).
|
||||
Msg("Didn't get any parts to send from converted messages")
|
||||
return
|
||||
}
|
||||
forward := true
|
||||
log.Debug().
|
||||
Int("event_count", len(events)).
|
||||
|
|
Loading…
Reference in a new issue