-
Notifications
You must be signed in to change notification settings - Fork 5
Configurable assigned task limit per Network #873
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
Configurable assigned task limit per Network #873
Conversation
dvc94ch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
| if capacity.is_zero() { | ||
| // no new tasks assigned if capacity reached or exceeded | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we already handle the zero case later no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We take(capacity) below after filtering for tasks that are assignable. I think returning early is better if capacity is 0 rather than going through all the tasks just to take 0 of them afterwards.
Co-authored-by: David Craven <[email protected]>
Closes #871
set_shard_task_limitnew_limit