|
|
@@ -269,9 +269,9 @@ func (that *Offloader) Do() { |
|
|
|
log.Printf("unable to scard %s: %s", key, err) |
|
|
|
continue |
|
|
|
} |
|
|
|
if scard > watermarkHigh { |
|
|
|
if scard > watermarkHigh || (k != q && scard > 0) { |
|
|
|
spopLimit := scard - watermarkHigh |
|
|
|
if spopLimit > batchSize { |
|
|
|
if k != q || spopLimit > batchSize { |
|
|
|
spopLimit = batchSize |
|
|
|
} |
|
|
|
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute) |
|
|
|