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

[task scheduling] basic task run queue capacity settings #11825

Merged
merged 6 commits into from
Feb 2, 2024

Conversation

zzstoatzz
Copy link
Contributor

adds

PREFECT_TASK_SCHEDULING_MAX_SCHEDULED_QUEUE_SIZE
PREFECT_TASK_SCHEDULING_MAX_RETRY_QUEUE_SIZE

to govern max per-task-key queue sizes

@zzstoatzz zzstoatzz requested review from zangell44 and a team as code owners February 2, 2024 19:51
Copy link

netlify bot commented Feb 2, 2024

Deploy Preview for prefect-docs-preview ready!

Name Link
🔨 Latest commit 9d2efb6
🔍 Latest deploy log https://app.netlify.com/sites/prefect-docs-preview/deploys/65bd493afbe33900084fceb5
😎 Deploy Preview https://deploy-preview-11825--prefect-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@zzstoatzz zzstoatzz changed the title basic task run queue capacity settings [task scheduling] basic task run queue capacity settings Feb 2, 2024
Copy link
Collaborator

@chrisguidry chrisguidry left a comment

Choose a reason for hiding this comment

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

I had to stare at those tests a while to see if they would cause new flakes but I don't think they will :D

_scheduled_queue: asyncio.Queue
_retry_queue: asyncio.Queue

@classmethod
async def enqueue(cls, task_run: schemas.core.TaskRun) -> None:
await cls.for_key(task_run.task_key).put(task_run)

@classmethod
def configure_task_key(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ooo I like that you made it configurable per task-key, that's a great steam valve for users.

@zzstoatzz zzstoatzz merged commit d8d0535 into main Feb 2, 2024
59 of 61 checks passed
@zzstoatzz zzstoatzz deleted the queue-capacity branch February 2, 2024 20:48
@serinamarie serinamarie added the enhancement An improvement of an existing feature label Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants