dapr / dapr/python-sdk

[WORKFLOW SDK FEATURE REQUEST] Make `WorkflowRuntime` async native

Open
#1,090 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

The worker runs activities on a background thread while the application runs on its own loop. This has caused `attached to a different loop` errors on async activities that use async grpc clients. There are patches for lazy initialization of grpc clients so they start on the caller's loop, but they are not ideal.

Depends on https://github.com/dapr/python-sdk/issues/1089

---
Acceptance criteria:
- [ ] `async with WorkflowRuntime()` and `await wfr.run()` run on the caller's loop
- [ ] Async activities execute on the caller's loop
- [ ] No resources are leaked
- [ ] Sync `start()` / `shutdown()` still works

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.