This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch kw-6443-v0.19
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/kw-6443-v0.19 by this push:
     new e4f679984 fix: linting
e4f679984 is described below

commit e4f679984f74cad985e239c635d3dcc4286d8b08
Author: Klesh Wong <[email protected]>
AuthorDate: Mon Nov 13 14:33:52 2023 +0800

    fix: linting
---
 backend/server/services/pipeline.go | 2 +-
 backend/worker/main.go              | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/backend/server/services/pipeline.go 
b/backend/server/services/pipeline.go
index 4dcccfd22..477bc7dd0 100644
--- a/backend/server/services/pipeline.go
+++ b/backend/server/services/pipeline.go
@@ -66,7 +66,7 @@ func pipelineServiceInit() {
        if temporalUrl != "" {
                // TODO: logger
                var err error
-               temporalClient, err = client.NewClient(client.Options{
+               temporalClient, err = client.NewLazyClient(client.Options{
                        HostPort: temporalUrl,
                })
                if err != nil {
diff --git a/backend/worker/main.go b/backend/worker/main.go
index 58a008153..a9324db63 100644
--- a/backend/worker/main.go
+++ b/backend/worker/main.go
@@ -18,6 +18,8 @@ limitations under the License.
 package main
 
 import (
+       "log"
+
        "github.com/apache/incubator-devlake/core/errors"
        "github.com/apache/incubator-devlake/core/runner"
        _ "github.com/apache/incubator-devlake/core/version"
@@ -25,7 +27,6 @@ import (
        "github.com/apache/incubator-devlake/worker/app"
        "go.temporal.io/sdk/client"
        "go.temporal.io/sdk/worker"
-       "log"
 )
 
 func main() {
@@ -38,7 +39,7 @@ func main() {
        // establish temporal connection
        TASK_QUEUE := basicRes.GetConfig("TEMPORAL_TASK_QUEUE")
        // Create the client object just once per process
-       c, err := errors.Convert01(client.NewClient(client.Options{
+       c, err := errors.Convert01(client.NewLazyClient(client.Options{
                HostPort: basicRes.GetConfig("TEMPORAL_URL"),
                Logger:   app.NewTemporalLogger(logruslog.Global),
        }))

Reply via email to