This commit is contained in:
parent
3f171d684c
commit
e1abf6b18a
|
@ -23,7 +23,6 @@ func ImportUserIdMap() {
|
|||
ctx := context.Background()
|
||||
|
||||
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)
|
||||
|
@ -50,6 +49,7 @@ func ImportUserIdMap() {
|
|||
if err != nil {
|
||||
fmt.Printf("CreateMappedUserIds err :%v", err)
|
||||
}
|
||||
userIdMaps = make([]*dbstruct.UserIdMap, 0)
|
||||
}
|
||||
if err == io.EOF {
|
||||
err := mcli.CreateMappedUserIds(ctx, userIdMaps)
|
||||
|
@ -61,7 +61,6 @@ func ImportUserIdMap() {
|
|||
}
|
||||
infile.Close()
|
||||
fmt.Printf("%dth imported", i)
|
||||
}(i)
|
||||
}
|
||||
|
||||
fmt.Printf("Import into test success")
|
||||
|
|
Loading…
Reference in New Issue