Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error message #1285

Merged
merged 2 commits into from
Jun 27, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions cloud/deployment/workerqueue/workerqueue.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,10 @@ func IsHostedCeleryWorkerQueueInputValid(requestedWorkerQueue *astro.WorkerQueue
return fmt.Errorf("%w: %s", errInvalidWorkerQueueOption, errorMessage)
}
// The floor for worker concurrency for hosted deployments is always 1 for all astro machines
if !(requestedWorkerQueue.WorkerConcurrency >= 1) ||
workerConcurrenyFloor := 1
if !(requestedWorkerQueue.WorkerConcurrency >= workerConcurrenyFloor) ||
!(requestedWorkerQueue.WorkerConcurrency <= machineOptions.ConcurrentTasksMax) {
errorMessage = fmt.Sprintf("worker concurrency must be between %d and %d", machineOptions.ConcurrentTasks, machineOptions.ConcurrentTasksMax)
errorMessage = fmt.Sprintf("worker concurrency must be between %d and %d", workerConcurrenyFloor, machineOptions.ConcurrentTasksMax)
return fmt.Errorf("%w: %s", errInvalidWorkerQueueOption, errorMessage)
}
if requestedWorkerQueue.PodCPU != "" {
Expand Down