Skip to content

Commit

Permalink
add limiter for no values to upsert (#13650)
Browse files Browse the repository at this point in the history
  • Loading branch information
EasterTheBunny authored Jun 21, 2024
1 parent c462111 commit 1146ca9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/bridges/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,10 @@ func (c *Cache) doBulkUpsert() {
values := maps.Values(c.bridgeLastValueCache)
c.mu.RUnlock()

if len(values) == 0 {
return
}

if err := c.ORM.BulkUpsertBridgeResponse(context.Background(), values); err != nil {
c.lggr.Warnf("bulk upsert of bridge responses failed: %s", err.Error())
}
Expand Down

0 comments on commit 1146ca9

Please sign in to comment.