by Robin at 20240923

This commit is contained in:
Leufolium 2024-09-23 15:36:01 +08:00
parent cb02d2f15c
commit 3f171d684c
1 changed files with 3 additions and 2 deletions

View File

@ -22,13 +22,14 @@ func ImportUserIdMap() {
}
ctx := context.Background()
for i := 0; i < 100; i++ {
pathurl := fmt.Sprintf("/app/data_prep/file/user_id_map%v.txt", i)
for i := 1; i < 100; i++ {
go func(i int) {
fmt.Printf("Importing %dth", i)
pathurl := fmt.Sprintf("/app/data_prep/file/user_id_map%v.txt", i)
infile, err := os.Open(pathurl)
if err != nil {
fmt.Printf("Open File Err : %v", err)
return
}
reader := bufio.NewReader(infile)
userIdMaps := make([]*dbstruct.UserIdMap, 0)