mirror of
https://github.com/FloatTech/zbpdata.git
synced 2024-11-17 17:47:14 +09:00
feat: 改为并行上传
This commit is contained in:
parent
50b189ebad
commit
fb80a176f0
8
main.go
8
main.go
@ -47,6 +47,14 @@ func main() {
|
||||
panic(err)
|
||||
}
|
||||
defer r.Close()
|
||||
for i := 0; i < 1024; i++ {
|
||||
err = r.Set("__setlock__", "fill")
|
||||
if err == nil {
|
||||
break
|
||||
}
|
||||
fmt.Println("accqiring set lock, retry times:", i)
|
||||
process.SleepAbout1sTo2s()
|
||||
}
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(len(files))
|
||||
for i, fn := range files {
|
||||
|
Loading…
Reference in New Issue
Block a user