[Feature Request] Guide against single-file structure
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
hello/hello_activity.py の47-64行目から始め、単一ファイルでの Worker と workflow の構成を、暗号化サンプルの worker.py および starter.py と比較します。ガイダンスをサンプル構造に含めるべきかコメントに含めるべきかを判断し、そのうえで、1つの Worker が workflows を提供する、分離された Worker プロセスとクライアントプロセスが明確かつ一貫するよう、関連するサンプルを更新します。
索引モデルが issue の本文から書いたものです。
説明
Is your feature request related to a problem? Please describe.
Given this single-file pattern of running a Workflow inside a Worker:
there is potential (and one past instance I know of) for people learning based off of samples to think that in order to run a Workflow, you need to run it inside an async with Worker. When they try to develop an application based on that paradigm, they run into a number of issues.
Describe the solution you'd like
Make it clear that when developing, we recommend:
- running a worker separately from workflows
- defaulting to a single worker for all workflows, not one worker per workflow
We could make it clear by structuring all samples that way. OTOH I like the brevity of the single file samples. Another possibility is changing the comment. The drawbacks to that are:
- some people don't read comments
- the comment might not be clear, unless you point to a multi-file sample, what exactly we recommend doing
Comment is currently:
# While the worker is running, use the client to run the workflow and
# print out its result. Note, in many production setups, the client
# would be in a completely separate process from the worker.
Perhaps could be:
# Use the client to run the workflow and print out its result.
# NOTE: when developing, we recommend starting out running a
# single worker that has all your workflow and activities and
# running client code in a separate process. See, for example,
# how the encryption sample has a separate files to run:
# worker.py runs the worker and starter.py uses the client.
- 主要言語
- Python
- スター
- 367
- フォーク
- 121
- 平均マージ
- 3日 20時間
- マージ済み PR(30日)
- 11
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
temporalio/samples-python のほかの issue
-
enhancement
temporalio/samples-python#254 · コメント 1 件 · 担当者 1 名 ·
-
enhancement
temporalio/samples-python#253 · 担当者 1 名 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
temporalio/samples-python#231 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
temporalio/samples-python#192 · コメント 2 件 ·
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
temporalio/samples-python#191 ·
temporalio/samples-python の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·