[Feature Request] Improve wait_condition semantics
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
首先使用 asyncio.gather 和 issue 中所示的两个 coro 调用复现 workflow.wait_condition 示例,然后检查 wait_condition 如何恢复并发工作流。定义并记录共享可变状态的预期行为;当消除所演示的 coro2 看到 False 的情况,或覆盖明确定义的 best-effort 行为时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Ideally, the following would not happen:
@workflow.defn
class WaitForSharedMutableStateWorkflow:
def __init__(self) -> None:
self.cond = False
@workflow.run
async def run(self):
self.cond = True
await asyncio.gather(self.coro("1"), self.coro("2"))
async def coro(self, id: str):
await workflow.wait_condition(lambda: self.cond)
print(f"after wait coro {id} sees {self.cond}") # ❗❗ <== coro2 sees False❗
self.cond = False
await asyncio.sleep(1)
self.cond = True
Completely eliminating the possibility would be ideal, but best-effort improvements would also be welcome.
- 主要语言
- Python
- 星标
- 1.3k
- 派生
- 305
- 平均合并
- 3 天 23 小时
- 30 天内合并 PR
- 44
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
temporalio/sdk-python 的其他 Issue
-
[Bug] Catching the ValueError from upsert_search_attributes (naive datetime) still leaves a workflow stuck retrying its task可能已有人在做 @VegetarianOrc 今天认领。 未关闭sdk-python
temporalio/sdk-python#2200 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug] Python: replayed Local Activity timeout causes NDE (TimeoutError not wrapped in ActivityError)可能已有人在做 @mjameswh 于 1 天前认领。 未关闭bug sdk-python
temporalio/sdk-python#2183 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Bug] workflow_streams: subscribe() raises RPCError when a publish signal lands during the continue-as-new workflow task可能已有人在做 @feiiiiii5 于 5 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 52/100
temporalio/sdk-python#2170 ·
维护者通常 1 天内回复
-
[Bug] Deadlock interruption can leak CPython's import lock and freeze the worker (still on Python 3.13/3.14)可能已有人在做 @tconley1428 于 21 天前认领。 未关闭sdk-python
难度 5/5 一周以上 新手友好度 25/100
temporalio/sdk-python#2115 ·
维护者通常 1 天内回复
-
Support custom peer identity verification while retaining standard TLS authentication可能已有人在做 @dzsquared 于 23 天前认领。 未关闭
难度 5/5 一周以上 新手友好度 35/100
temporalio/sdk-python#2106 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 temporalio/sdk-python 的全部 Issue
相似的 Issue
-
area:print-dispatch
难度 2/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
难度 2/5 1-3 小时 新手友好度 68/100
Apich-Organization/rssn#295 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
chore claimed
难度 2/5 1-3 小时 新手友好度 72/100
schuyler/corvidae#1424 · 2 条评论 ·
维护者通常 1 天内回复