Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/dispatch/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ def __init__(
function_service = _new_app(self, verification_key)
app.mount("/dispatch.sdk.v1.FunctionService", function_service)

def batch(self) -> Batch:
"""Returns a Batch instance that can be used to build
a set of calls to dispatch."""
return self.client.batch()


def parse_verification_key(
verification_key: Ed25519PublicKey | str | bytes | None,
Expand Down
5 changes: 5 additions & 0 deletions src/dispatch/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ def set_client(self, client: Client):
for fn in self.functions.values():
fn._client = client

def batch(self) -> Batch:
"""Returns a Batch instance that can be used to build
a set of calls to dispatch."""
return self.client.batch()


class Client:
"""Client for the Dispatch API."""
Expand Down
6 changes: 5 additions & 1 deletion src/dispatch/test/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def main():
print(f' export DISPATCH_VERIFICATION_KEY="{verification_key}"')
print()

server.wait()
try:
server.wait()
except KeyboardInterrupt:
print("closing down server after interrupt")
pass


if __name__ == "__main__":
Expand Down