Skip to content

Commit

Permalink
fix Yuce's PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kmetin committed Nov 3, 2023
1 parent 4d498e8 commit 262b526
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions base/commands/migration/migration_stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ func fetchOverallProgress(ctx context.Context, ci *hazelcast.ClientInternal, mig
if err != nil {
return 0, 0, err
}
// convert it to parsable duration format
rtStr := fmt.Sprintf("%sms", remainingTime.(serialization.JSON).String())
rt, err := time.ParseDuration(rtStr)
rt, err := strconv.ParseInt(remainingTime.(serialization.JSON).String(), 10, 64)
if err != nil {
return 0, 0, err
}
Expand All @@ -276,7 +274,7 @@ func fetchOverallProgress(ctx context.Context, ci *hazelcast.ClientInternal, mig
if err != nil {
return 0, 0, err
}
return rt, float32(cp), nil
return time.Duration(rt) * time.Millisecond, float32(cp), nil
}
return 0, 0, errors.New("no rows found")
}
Expand Down

0 comments on commit 262b526

Please sign in to comment.