Skip to content

Reduce local provider queue delay with fast-path dispatch#1553

Merged
deep1401 merged 2 commits intomainfrom
claude/reduce-queue-delay-l5yqS
Mar 16, 2026
Merged

Reduce local provider queue delay with fast-path dispatch#1553
deep1401 merged 2 commits intomainfrom
claude/reduce-queue-delay-l5yqS

Conversation

@aliasaria
Copy link
Copy Markdown
Member

Replace the long-running background worker loop with on-demand task
creation. When a job is submitted and no other job is processing, it
starts immediately via asyncio.create_task() instead of going through
the asyncio.Queue round-trip. When a job IS already processing, the
new job is buffered in the queue and drained sequentially after the
current job completes.

https://claude.ai/code/session_01SbHdBY6MjKL7JGhUQ1QotF

Replace the long-running background worker loop with on-demand task
creation. When a job is submitted and no other job is processing, it
starts immediately via asyncio.create_task() instead of going through
the asyncio.Queue round-trip. When a job IS already processing, the
new job is buffered in the queue and drained sequentially after the
current job completes.

https://claude.ai/code/session_01SbHdBY6MjKL7JGhUQ1QotF
@paragon-review
Copy link
Copy Markdown

Paragon Review Skipped

Hi @aliasaria! Your Polarity credit balance is insufficient to complete this review.

Please visit https://home.polarity.cc to add more credits and continue using Paragon reviews.

@sentry
Copy link
Copy Markdown

sentry bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 18.75000% with 13 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...pi/transformerlab/services/local_provider_queue.py 18.75% 13 Missing ⚠️

📢 Thoughts on this report? Let us know!

@deep1401 deep1401 marked this pull request as draft March 16, 2026 14:59
@deep1401 deep1401 marked this pull request as ready for review March 16, 2026 19:53
Copy link
Copy Markdown
Member

@deep1401 deep1401 left a comment

Choose a reason for hiding this comment

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

Just adding more context, this fixes a job going from INTERACTIVE > WAITING > INTERACTIVE when using local provider

@deep1401 deep1401 merged commit 993f08f into main Mar 16, 2026
8 of 9 checks passed
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