mirror of
https://tangled.org/evan.jarrett.net/at-container-registry
synced 2026-09-13 13:44:14 +00:00
update rate limit calculation
This commit is contained in:
+3
-4
@@ -765,10 +765,9 @@ func (gc *GarbageCollector) reconcileMissingRecords(ctx context.Context, missing
|
||||
"total", len(missing))
|
||||
}
|
||||
|
||||
// Throttle to avoid flooding the firehose (~100 records/sec)
|
||||
if i < len(missing)-1 {
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
// Throttle: ramp delay based on record index to avoid flooding relays
|
||||
delay := max(10*time.Millisecond, time.Duration(i)*100*time.Microsecond)
|
||||
time.Sleep(delay)
|
||||
}
|
||||
|
||||
if result.RecordsReconciled > 0 {
|
||||
|
||||
Reference in New Issue
Block a user