fix: address batch image ci failures

This commit is contained in:
Turtle_Li committed 2026-07-07 10:50:36 +08:00
1 parent 89edba8028
commit aff148167c
11 files changed
+63 -51

No files matched your search

@@ -62,16 +62,6 @@ func NewBatchImageDownloadLimiter(rdb *redis.Client, cfg *config.Config) service
}
}
func newBatchImageDownloadLimiterForTest(rdb *redis.Client, maxActive int, ttl time.Duration) *batchImageDownloadLimiter {
if maxActive <= 0 {
maxActive = defaultBatchImageDownloadConcurrency
}
if ttl <= 0 {
ttl = defaultBatchImageDownloadActiveTTL
}
return &batchImageDownloadLimiter{rdb: rdb, activePrefix: defaultBatchImageDownloadActivePrefix, maxActive: maxActive, ttl: ttl}
}
func (l *batchImageDownloadLimiter) Acquire(ctx context.Context, userID string, kind string) (service.BatchImageDownloadPermit, error) {
if l == nil || l.rdb == nil {
return nil, service.ErrBatchImageDownloadLimited