|
|
@ -24,7 +24,6 @@ import (
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"slices"
|
|
|
|
"slices"
|
|
|
|
"strconv"
|
|
|
|
|
|
|
|
"strings"
|
|
|
|
"strings"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
@ -2209,22 +2208,6 @@ func blockDirs(dir string) ([]string, error) {
|
|
|
|
return dirs, nil
|
|
|
|
return dirs, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func sequenceFiles(dir string) ([]string, error) {
|
|
|
|
|
|
|
|
files, err := os.ReadDir(dir)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return nil, err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
var res []string
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for _, fi := range files {
|
|
|
|
|
|
|
|
if _, err := strconv.ParseUint(fi.Name(), 10, 64); err != nil {
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
res = append(res, filepath.Join(dir, fi.Name()))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return res, nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func exponential(d, min, max time.Duration) time.Duration {
|
|
|
|
func exponential(d, min, max time.Duration) time.Duration {
|
|
|
|
d *= 2
|
|
|
|
d *= 2
|
|
|
|
if d < min {
|
|
|
|
if d < min {
|
|
|
|