diff --git a/importfunc/import_user_id_map.go b/importfunc/import_user_id_map.go index cdf217d..2ae658f 100644 --- a/importfunc/import_user_id_map.go +++ b/importfunc/import_user_id_map.go @@ -33,13 +33,14 @@ func ImportUserIdMap() { if upper >= len(list) { upper = len(list) - 1 } - go ImportAsList(mcli, ctx, list[lower:upper]) + go ImportAsList(mcli, ctx, list[lower:upper], i) } fmt.Printf("Import into test success") } -func ImportAsList(mcli *mongo.Mongo, ctx context.Context, list []int64) { +func ImportAsList(mcli *mongo.Mongo, ctx context.Context, list []int64, s int) { + fmt.Printf("Importing %dth", s) userIdMaps := make([]*dbstruct.UserIdMap, 0) for i := range list { seq := int64(1000000) + int64(i) @@ -62,4 +63,5 @@ func ImportAsList(mcli *mongo.Mongo, ctx context.Context, list []int64) { fmt.Printf("CreateMappedUserIds err :%v", err) } } + fmt.Printf("%dth imported", s) }