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

Adds a private status endpoint to TaskWorker #14089

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

chrisguidry
Copy link
Collaborator

This endpoint, at http://127.0.0.1:4422/status reports the current state of
the TaskWorker, including what its limiting parameters look like and which
task runs of each key are currently in-flight. This is a rough-and-ready
monitoring endpoint that we can flesh out with more info and tests as we go, but
for now, we need it for load testing and reliability troubleshooting.

This endpoint, at `http://127.0.0.1:4422/status` reports the current state of
the `TaskWorker`, including what its limiting parameters look like and which
task runs of each key are currently in-flight.  This is a rough-and-ready
monitoring endpoint that we can flesh out with more info and tests as we go, but
for now, we need it for load testing and reliability troubleshooting.
@chrisguidry chrisguidry requested a review from a team as a code owner June 17, 2024 18:45
src/prefect/task_worker.py Outdated Show resolved Hide resolved
src/prefect/task_worker.py Outdated Show resolved Hide resolved
@sync_compatible
async def serve(*tasks: Task, limit: Optional[int] = 10):
async def serve(
*tasks: Task, limit: Optional[int] = 10, status_server_port: Optional[int] = None
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@desertaxle how about this, two birds, one stone?

Copy link
Member

Choose a reason for hiding this comment

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

That's a killer bird to stone ratio

@chrisguidry chrisguidry merged commit 2589158 into main Jun 17, 2024
26 checks passed
@chrisguidry chrisguidry deleted the task-worker-status-server branch June 17, 2024 19:55
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.

None yet

2 participants