Repository navigation
Feat: stream completed chunks #157
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
base: master
Are you sure you want to change the base?
Changes from all commits
728d673
8e48718
a7508bb
12d4ce9
f4ff26f
11b2be6
b25a44c
004b472
fe6d039
ca7821b
cdf3f62
2e7a53d
3743125
cfdb994
feae80c
85bc8fa
8882e43
1d248bd
6b61b0f
a2fdf7b
7fe4ade
8cb53bc
4dc87fa
3d3021d
b6d884c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "folders": [ | ||
| { | ||
| "path": "..", | ||
| "name": "opsqueue", | ||
| }, | ||
| { | ||
| "path": "../libs/opsqueue_python", | ||
| "name": "opsqueue_python", | ||
| } | ||
| ], | ||
| "settings": {} | ||
| } |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,6 +28,7 @@ | |
| SubmissionNotCancellable, | ||
| SubmissionPaused, | ||
| InitialSubmissionStatus, | ||
| Strategy, | ||
| ) | ||
|
|
||
| __all__ = [ | ||
|
|
@@ -240,6 +241,26 @@ def run_submission_chunks( | |
| ) | ||
| return self.blocking_stream_completed_submission_chunks(submission_id, timeout) | ||
|
|
||
| def stream_submission_chunks( | ||
| self, | ||
| submission_id: SubmissionId, | ||
| strategy: Strategy, | ||
| ) -> Iterator[bytes]: | ||
| """Stream chunks progressively; strategy must be Oldest for this submission.""" | ||
| return self.inner.stream_submission_chunks( # type: ignore[no-any-return] | ||
| submission_id, strategy | ||
| ) | ||
|
|
||
| async def async_stream_submission_chunks( | ||
| self, | ||
| submission_id: SubmissionId, | ||
| strategy: Strategy, | ||
| ) -> AsyncIterator[bytes]: | ||
| """Stream chunks progressively; strategy must be Oldest for this submission.""" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need a strategy if we only accept Oldest? Can't we simply document that we will use Or is it about the inner most strategy needing to be |
||
| return await self.inner.async_stream_submission_chunks( # type: ignore[no-any-return] | ||
| submission_id, strategy | ||
| ) | ||
|
|
||
| async def async_run_submission_chunks( | ||
| self, | ||
| chunk_contents: Iterable[bytes], | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This folder should be
.gitignored.