We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fae6af commit 411635aCopy full SHA for 411635a
internal/assets/cache/collection.go
@@ -129,11 +129,11 @@ func (c *Collection[T]) addID(id string) bool {
129
added = true
130
c.newItems.Add(id)
131
if c.newItems.Len() >= c.maxCacheSize {
132
- var err error
133
- c.collection, err = c.saveFn(c.collection, c.newItems.Items())
134
- if err == nil {
135
- c.newItems = syncset.New[string]()
136
- }
+ // err is ignored because it's logged in the saveFn
+ c.collection, _ = c.saveFn(c.collection, c.newItems.Items())
+
+ // a fresh set of assets, even if the save failed, to avoid retrying the same assets
+ c.newItems = syncset.New[string]()
137
}
138
139
return added
0 commit comments