Commit 5cacf84f by Li Feifei

print log

parent 8705aa1a
Pipeline #14637 passed with stages
in 1 minute 2 seconds
...@@ -38,7 +38,6 @@ var ( ...@@ -38,7 +38,6 @@ var (
client *http.Client client *http.Client
token string token string
once sync.Once once sync.Once
Pool *workpool.WorkPool
) )
const docUrl string = "http://doc.offcncloud.com/" const docUrl string = "http://doc.offcncloud.com/"
...@@ -47,9 +46,6 @@ const docUrl string = "http://doc.offcncloud.com/" ...@@ -47,9 +46,6 @@ const docUrl string = "http://doc.offcncloud.com/"
func init() { func init() {
log.SetFlags(log.Lshortfile | log.LstdFlags) log.SetFlags(log.Lshortfile | log.LstdFlags)
once.Do(func() {
Pool = workpool.New(10)
})
} }
//func main() { //func main() {
...@@ -268,7 +264,7 @@ func Down(v *models.XyuSmallTempFiles) { ...@@ -268,7 +264,7 @@ func Down(v *models.XyuSmallTempFiles) {
UpdateFileError("4", v.Uuid, v.RoomNum, objectName) UpdateFileError("4", v.Uuid, v.RoomNum, objectName)
return return
} }
Pool := workpool.New(10)
for _, file := range reader.File { for _, file := range reader.File {
Pool.DoWait(func() error { Pool.DoWait(func() error {
log.Printf("file = %s \n", file.Name) log.Printf("file = %s \n", file.Name)
...@@ -278,8 +274,6 @@ func Down(v *models.XyuSmallTempFiles) { ...@@ -278,8 +274,6 @@ func Down(v *models.XyuSmallTempFiles) {
break break
} }
} }
return err return err
}) })
//go func(file *zip.File) { //go func(file *zip.File) {
......
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