将注释翻译为中文以提高代码可读性
This commit is contained in:
parent
c50d6f1771
commit
9aa99178ab
@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Create a Temporal client with the default options.
|
||||
// 创建使用默认选项的 Temporal 客户端。
|
||||
c, err := client.Dial(client.Options{HostPort: "temporal.newai.day:17233"})
|
||||
if err != nil {
|
||||
log.Fatalln("Unable to create Temporal client", err)
|
||||
@ -18,17 +18,17 @@ func main() {
|
||||
|
||||
taskQueue := "test-task-queue"
|
||||
|
||||
// Create a Worker that listens on the specified Task Queue.
|
||||
// 创建一个监听指定任务队列的 Worker。
|
||||
w := worker.New(c, taskQueue, worker.Options{})
|
||||
|
||||
// Register the Workflow and the real Go suffix Activity with the Worker.
|
||||
// 将工作流和带有真实 Go 后缀的活动注册到 Worker。
|
||||
w.RegisterWorkflow(workflows.TestRunWorkflow)
|
||||
w.RegisterActivity(activities.AddSuffixActivity)
|
||||
//(for later) w.RegisterActivity(activities.AddSuffixActivity)
|
||||
|
||||
// Note: The Python and ts activities will be handled by the Python/ts worker and is not registered here.
|
||||
// 注意:Python 和 ts 活动将由 Python/ts 进程处理,此处未进行注册。
|
||||
|
||||
// Start the Worker. This call blocks until the Worker is interrupted.
|
||||
// 启动 Worker。此调用会阻塞,直到 Worker 被中断。
|
||||
err = w.Run(worker.InterruptCh())
|
||||
if err != nil {
|
||||
log.Fatalln("Unable to start Worker", err)
|
||||
|
Loading…
Reference in New Issue
Block a user