[Feature Request] Guide against single-file structure
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- documentation
Hướng nghiên cứu
Bắt đầu với hello/hello_activity.py, các dòng 47-64, và so sánh thiết lập Worker và workflow trong một tệp duy nhất của nó với worker.py và starter.py trong mẫu mã hóa. Quyết định xem hướng dẫn nên nằm trong cấu trúc mẫu hay trong các chú thích, sau đó cập nhật các mẫu liên quan để các tiến trình Worker và client riêng biệt, với một Worker phục vụ workflows, được thể hiện rõ ràng và nhất quán.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 367
- Fork
- 121
- Merge trung bình
- 3 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 11
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của temporalio/samples-python
-
enhancement
temporalio/samples-python#254 · 1 bình luận · 1 người được giao ·
-
enhancement
temporalio/samples-python#253 · 1 người được giao ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
temporalio/samples-python#231 · 1 bình luận ·
-
[Bug] RestrictedWorkflowAccessError on async context manager in return close of an activity. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
temporalio/samples-python#192 · 2 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
temporalio/samples-python#191 ·
Tất cả issue của temporalio/samples-python
Issue tương tự
-
sponsored
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
opensubtitlescom: moviehash never sent when opensubtitles (.org) is not in the provider list Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Diaoul/subliminal#1382 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
worker.gpuVendors silently accepts unsupported/misspelled vendor names — no validation guard Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100