Skip to content

Commit 68de71c

Browse files
committed
enlarge the gc workers to 10
Signed-off-by: wang yan <[email protected]>
1 parent 28c3a0e commit 68de71c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Diff for: src/portal/src/app/base/left-side-nav/clearing-job/clearing-job-interfact.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ export const NO: string = 'TAG_RETENTION.NO';
2121

2222
export const REFRESH_STATUS_TIME_DIFFERENCE: number = 5000;
2323

24-
export const WORKER_OPTIONS: number[] = [1, 2, 3, 4, 5];
24+
export const WORKER_OPTIONS: number[] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];

Diff for: src/server/v2.0/handler/gc.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func (g *gcAPI) kick(ctx context.Context, scheType string, cron string, paramete
106106
return 0, errors.BadRequestError(fmt.Errorf("workers should be integer format"))
107107
}
108108
if !validateWorkers(int(wInt)) {
109-
return 0, errors.New(nil).WithCode(errors.BadRequestCode).WithMessagef("Error: Invalid number of workers:%s. Workers must be greater than 0 and less than or equal to 5.", workers)
109+
return 0, errors.New(nil).WithCode(errors.BadRequestCode).WithMessagef("Error: Invalid number of workers:%s. Workers must be greater than 0 and less than or equal to 10.", workers)
110110
}
111111
policy.Workers = int(wInt)
112112
}
@@ -130,7 +130,7 @@ func (g *gcAPI) kick(ctx context.Context, scheType string, cron string, paramete
130130
return 0, errors.BadRequestError(fmt.Errorf("workers should be integer format"))
131131
}
132132
if !validateWorkers(int(wInt)) {
133-
return 0, errors.New(nil).WithCode(errors.BadRequestCode).WithMessagef("Error: Invalid number of workers:%s. Workers must be greater than 0 and less than or equal to 5.", workers)
133+
return 0, errors.New(nil).WithCode(errors.BadRequestCode).WithMessagef("Error: Invalid number of workers:%s. Workers must be greater than 0 and less than or equal to 10.", workers)
134134
}
135135
policy.Workers = int(wInt)
136136
}
@@ -284,7 +284,7 @@ func (g *gcAPI) StopGC(ctx context.Context, params operation.StopGCParams) middl
284284
}
285285

286286
func validateWorkers(workers int) bool {
287-
if workers <= 0 || workers > 5 {
287+
if workers <= 0 || workers > 10 {
288288
return false
289289
}
290290
return true

0 commit comments

Comments
 (0)