缓解io压力
This commit is contained in:
@@ -127,8 +127,8 @@ func (s *ConcurrencyService) GetByTaskType(ctx context.Context, taskType string)
|
||||
// UpdateMaxConcurrency 更新最大并发数
|
||||
func (s *ConcurrencyService) UpdateMaxConcurrency(ctx context.Context, taskType string, maxConcurrency int, updatedBy uint) error {
|
||||
// 验证参数
|
||||
if maxConcurrency < 1 {
|
||||
return errors.New(errors.CodeInvalidParam, "并发数必须为正整数")
|
||||
if maxConcurrency < 1 || maxConcurrency > constants.PollingMaxConcurrencyLimit {
|
||||
return errors.New(errors.CodeInvalidParam, "并发数必须为 1-1000")
|
||||
}
|
||||
|
||||
// 验证任务类型存在
|
||||
|
||||
Reference in New Issue
Block a user