by Robin at 20240923
This commit is contained in:
parent
da3026fae5
commit
cb02d2f15c
|
@ -22,15 +22,10 @@ func ImportUserIdMap() {
|
|||
}
|
||||
ctx := context.Background()
|
||||
|
||||
userIdSeq, err := mcli.GetUserIdImportSeq(ctx)
|
||||
if err != nil {
|
||||
fmt.Printf("GetUserIdImportSeq fail : %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
pathurl := fmt.Sprintf("/app/data_prep/file/user_id_map%v.txt", userIdSeq.Seq)
|
||||
|
||||
fmt.Printf("Importing %dth", userIdSeq.Seq)
|
||||
for i := 0; i < 100; i++ {
|
||||
pathurl := fmt.Sprintf("/app/data_prep/file/user_id_map%v.txt", i)
|
||||
go func(i int) {
|
||||
fmt.Printf("Importing %dth", i)
|
||||
infile, err := os.Open(pathurl)
|
||||
if err != nil {
|
||||
fmt.Printf("Open File Err : %v", err)
|
||||
|
@ -64,7 +59,9 @@ func ImportUserIdMap() {
|
|||
}
|
||||
}
|
||||
infile.Close()
|
||||
fmt.Printf("%dth imported", userIdSeq.Seq)
|
||||
fmt.Printf("%dth imported", i)
|
||||
}(i)
|
||||
}
|
||||
|
||||
fmt.Printf("Import into test success")
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue