feat: make PendingTasksRunner concurrency configurable via Wendy.setup#221
feat: make PendingTasksRunner concurrency configurable via Wendy.setup#221jangoes wants to merge 2 commits intolevibostian:mainfrom
Conversation
- Add semaphoreValue parameter to Wendy.setup to control max concurrent tasks - Store semaphoreValue in WendyConfig and use it when initializing PendingTasksRunner - Update unit tests to verify semaphoreValue configuration
aef155f to
e7a0a45
Compare
|
Greatly appreciate you opening up a PR for this feature. I do agree, it would be great to have this implemented. It would be a great feature to have. Looking through the PR code, I am realizing now that there are more changes required to fully implement this feature. The entire codebase has the assumption that only 1 task runs at a time so in order to implement this feature it will require modifying a lot of different pieces of the code. While glancing over the code, here are some code that will need modified:
Regarding the PR's implementation approach, I wonder if we might consider some simplifications. For example, I wonder if this would work:
It's worth noting that Lastly, this feature will require a lot of automated tests, including integration tests, to verify it works as intended. If this feature has a bug in it, it could cause some serious damage. I understand this message might seem like a significant amount of work, and I appreciate your efforts. This is indeed one of the more complex features that could be integrated into this codebase. Hope this message doesn't sound discouraging. |
|
Hi @levibostian , Thanks for the detailed feedback — that all makes sense. I’ll take some time to think through the changes needed and see how best to approach it when I get the chance. Appreciate the thoughtful review! |
Related GitHub Issues
#220
Problem
The concurrency level for running tasks in PendingTasksRunner was previously hardcoded to 1, allowing only serial execution. There was no way to configure or increase the number of concurrent tasks, limiting performance and flexibility for use cases that could benefit from parallelism.
Solution
Testing