From 9aa99178ab10ea6f67754a145f2ae58627a0f5d0 Mon Sep 17 00:00:00 2001 From: longpeng Date: Fri, 20 Jun 2025 17:42:42 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E6=B3=A8=E9=87=8A=E7=BF=BB=E8=AF=91?= =?UTF-8?q?=E4=B8=BA=E4=B8=AD=E6=96=87=E4=BB=A5=E6=8F=90=E9=AB=98=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=8F=AF=E8=AF=BB=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workers/go/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/workers/go/main.go b/workers/go/main.go index e1512b8..b5aa666 100644 --- a/workers/go/main.go +++ b/workers/go/main.go @@ -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)