Skip to content

[SHIP-834] [SHIP-818] Streaming Generators#548

Merged
dkolas merged 4 commits into
mainfrom
streaming-generators
Sep 18, 2023
Merged

[SHIP-834] [SHIP-818] Streaming Generators#548
dkolas merged 4 commits into
mainfrom
streaming-generators

Conversation

@dkolas
Copy link
Copy Markdown
Contributor

@dkolas dkolas commented Sep 11, 2023

This PR includes:

  • Streaming Generator interface
  • Additional methods and status on Block for streaming

Depends on: https://github.com/nludb/nludb/pull/631

(tests will fail until deploy of above)

@dkolas dkolas changed the title Streaming Generators [SHIP-834] [SHIP-818] Streaming Generators Sep 11, 2023
Copy link
Copy Markdown
Contributor

@eob eob left a comment

Choose a reason for hiding this comment

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

LGTM! This is really exciting

class StreamState(str, Enum):
STARTED = "started" # A producer has begun streaming to this block.
COMPLETE = "complete" # The producer has finished streaming to this block successfully.
ABORTED = "aborted" # The producer finished streaming to the block, but there was an error.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: I don't think this is a huge deal, but if you wanted to align with the enums we use in the task system I think these would be: running, succeeded, failed

return f"{self.id}"
return f"Block({self.id})"

def finish_stream(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh I see you were aiming for alignment with these routes

@dkolas dkolas added this pull request to the merge queue Sep 15, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 15, 2023
@dkolas dkolas added this pull request to the merge queue Sep 18, 2023
Merged via the queue into main with commit b26291d Sep 18, 2023
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.

2 participants