feat(local): thumbnail token bucket smooth migration (#7425)
* feat(local): allow to migrate static token buckets * improve(local): token bucket migration boundary handling
This commit is contained in:
@ -76,7 +76,7 @@ func (d *Local) Init(ctx context.Context) error {
|
||||
if d.thumbConcurrency == 0 {
|
||||
d.thumbTokenBucket = NewNopTokenBucket()
|
||||
} else {
|
||||
d.thumbTokenBucket = NewStaticTokenBucket(d.thumbConcurrency)
|
||||
d.thumbTokenBucket = NewStaticTokenBucketWithMigration(d.thumbTokenBucket, d.thumbConcurrency)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user