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

enhance: start worker goroutines on demand #12

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

thedadams
Copy link
Contributor

@thedadams thedadams commented Feb 7, 2025

Instead of having a bunch of waiting goroutines, this change will introduce one goroutine per type that waits for new tasks. That goroutine will spin up new goroutines, up to the desired limit, to handle tasks as they come in.

Issue: obot-platform/obot#1694

@thedadams thedadams force-pushed the minimize-worker-goroutines branch from 8477886 to 84c6a12 Compare February 7, 2025 19:22
Instead of having a bunch of waiting goroutines, this change will
introduce one goroutine per type that waits for new tasks. That
goroutine will spin up new goroutines, up to the desired limit, to
handle tasks as they come in.

Signed-off-by: Donnie Adams <[email protected]>
@thedadams thedadams force-pushed the minimize-worker-goroutines branch from 84c6a12 to 1f6217c Compare February 7, 2025 19:25
A QueueSplitter interface is added that allows the caller to have
multiple worker queues per GVK. This allows for a sort of priority-based
queuing mechanism.

Signed-off-by: Donnie Adams <[email protected]>
@thedadams thedadams merged commit 4c7b8ce into obot-platform:main Feb 10, 2025
1 check passed
@thedadams thedadams deleted the minimize-worker-goroutines branch February 10, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants