dapr / dapr/python-sdk

[WORKFLOW SDK FEATURE REQUEST] Use `grpc.aio` in the durabletask worker

Open
#1,089 3 comments 0 reactions 0 assignees View on GitHub
dapr-ext-workflow kind/enhancement
Dominant language
Python
Stars
272
Forks
152
PR merge metrics
No merged PRs in 30d

Description

`TaskHubGrpcWorker` consumes the sidecar stream on a dedicated `StreamReader` thread and pushes things to the event loop through a queue. We already have grpc.aio in the SDK, we can consume it asynchronously and remove the thread and the queue.

This should not change the public API.

----

Acceptance criteria:

- [ ] The worker consumes the stream asynchronously
- [ ] `WorkflowRuntime.start()` / `.shutdown()` still works
- [ ] Reconnect on stream drop and on transient errors still works
- [ ] No leaked resources on shutdown

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.