Commit f23543e4 by Li Feifei

改为异步请求

parent d8f01607
Pipeline #16072 passed with stages
in 35 seconds
...@@ -158,8 +158,9 @@ func (f *ObtainFile) uploadPicture() error { ...@@ -158,8 +158,9 @@ func (f *ObtainFile) uploadPicture() error {
pool := workpool.New(100) pool := workpool.New(100)
for _, file := range reader.File { for _, file := range reader.File {
tempFile := file
pool.Do(func() error { pool.Do(func() error {
return f.task(file) return f.task(tempFile)
}) })
} }
return pool.Wait() return pool.Wait()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment