Skip to content
New issue

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

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

Already on GitHub? # to your account

Allow MaximumConcurrentTasks to be unlimited (lower than zero) #426

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

surmabck
Copy link

This is a possible implementation of: spring-cloud/spring-cloud-dataflow#5646

@corneil corneil requested review from corneil and cppwfs June 10, 2024 07:23
@@ -221,9 +221,16 @@ public String getLog(String id) {
}

private boolean maxConcurrentExecutionsReached() {
if (isMaximumConcurrentTasksUnlimited()) {
return false;
}
return this.getRunningTaskExecutionCount() >= this.getMaximumConcurrentTasks();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about return this.getMaximumConcurrentTasks() > 0 && this.getCurrentTaskExecutionCount() >= this.getMaximumConcurrentTasks();
This would allow a value of 0 to indicate no limit since 0 would normally mean no tasks can be executed

@@ -221,9 +221,16 @@ public String getLog(String id) {
}

private boolean maxConcurrentExecutionsReached() {
if (isMaximumConcurrentTasksUnlimited()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also we need a unit test.

@cppwfs cppwfs added the for/team-attention For team attention label Sep 5, 2024
@cppwfs cppwfs added this to the 3.0.x milestone Sep 6, 2024
@cppwfs cppwfs removed the for/team-attention For team attention label Sep 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants