fix(task): update task max page size error message to include an accurate limit
previously it had returned and error of 100, but the limit was 500.pull/19244/head
parent
1e19a3682d
commit
35bc18bc34
|
@ -3394,7 +3394,7 @@ func (s *Service) getAllTasks(ctx context.Context, orgID influxdb.ID) ([]*influx
|
|||
for {
|
||||
f := influxdb.TaskFilter{
|
||||
OrganizationID: &orgID,
|
||||
Limit: 100,
|
||||
Limit: influxdb.TaskMaxPageSize,
|
||||
}
|
||||
if afterID != nil {
|
||||
f.After = afterID
|
||||
|
|
|
@ -57,8 +57,13 @@ var (
|
|||
Code: EInvalid,
|
||||
}
|
||||
|
||||
// ErrPageSizeTooLarge indicates the page size is too large. This error is only
|
||||
// used in the kv task service implementation. The name of this error may lead it
|
||||
// to be used in a place that is not useful. The TaskMaxPageSize is the only one
|
||||
// at 500, the rest at 100. This would likely benefit from a more specific name
|
||||
// since those limits aren't shared globally.
|
||||
ErrPageSizeTooLarge = &Error{
|
||||
Msg: fmt.Sprintf("cannot use page size larger then %d", MaxPageSize),
|
||||
Msg: fmt.Sprintf("cannot use page size larger then %d", TaskMaxPageSize),
|
||||
Code: EInvalid,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue