fix(jobservice): value out of range (#14634)

value out of range when job count bigger than 256

Signed-off-by: vic <985695123@qq.com>
This commit is contained in:
Archer1A 2021-04-14 14:28:36 +08:00 committed by GitHub
parent 28d4e285f9
commit 264e2e45f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,7 @@ func (bm *basicManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
return nil, 0, errors.New("malform scan results")
}
nextCur, err := strconv.ParseUint(string(values[0].([]byte)), 10, 8)
nextCur, err := strconv.ParseInt(string(values[0].([]byte)), 10, 64)
if err != nil {
return nil, 0, err
}
@ -166,7 +166,7 @@ func (bm *basicManager) GetJobs(q *query.Parameter) ([]*job.Stats, int64, error)
}
}
return results, int64(nextCur), nil
return results, nextCur, nil
}
// GetPeriodicExecution is implementation of Manager.GetPeriodicExecution