feat: task result streaming with publish/stream/astream#35
Merged
pratyush618 merged 5 commits intomasterfrom Mar 22, 2026
Merged
feat: task result streaming with publish/stream/astream#35pratyush618 merged 5 commits intomasterfrom
pratyush618 merged 5 commits intomasterfrom
Conversation
- current_job.publish(data) writes partial results as task logs with level="result", reusing existing write_task_log infrastructure - job.stream(timeout, poll_interval) yields partial results as a blocking iterator, stops on terminal job status - job.astream() async variant using asyncio.sleep - No Rust changes needed — built entirely on existing task_logs
Add ?include_results=true query param to GET /jobs/{id}/progress
to stream partial results alongside progress updates via SSE.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
current_job.publish(data): stream partial results from inside tasks — stores as task log entries withlevel="result", reusing existingwrite_task_loginfrastructure (zero Rust changes)job.stream(timeout, poll_interval): blocking iterator that yields partial results as they arrive, stops on terminal job statusawait job.astream(): async variant usingasyncio.sleepGET /jobs/{id}/progress?include_results=truestreams partial results alongside progress eventsTest plan
uv run python -m pytest tests/python/ -v— 357 pass, 9 skippeduv run ruff check py_src/ tests/— cleanuv run mypy py_src/taskito/ tests/python/— 0 errors