From a7c4fe969cdff9a2ae45e7c59a7a67d3246a7e0c Mon Sep 17 00:00:00 2001 From: Ketsia Date: Sun, 18 Aug 2024 22:47:00 +0200 Subject: [PATCH] update debug log msg & internal pkg --- internal/debug/lifecycle.go | 2 ++ internal/internal_worker.go | 2 +- internal/worker.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/debug/lifecycle.go b/internal/debug/lifecycle.go index a156d1497..c888b2b6a 100644 --- a/internal/debug/lifecycle.go +++ b/internal/debug/lifecycle.go @@ -47,6 +47,7 @@ type ( // PollerStart collects information on poller start up. // consumers should provide a concurrency-safe implementation. PollerStart(workerID string) Run + // ReadPollerCount return the number or running pollers ReadPollerCount() int32 } @@ -70,6 +71,7 @@ func (lc *lifeCycleImpl) ReadPollerCount() int32 { return lc.pollerCount.Load() } +// NewLifeCycle creates a new LifeCycle instance func NewLifeCycle() LifeCycle { return &lifeCycleImpl{} } var _ LifeCycle = &lifeCycleImpl{} diff --git a/internal/internal_worker.go b/internal/internal_worker.go index dfae766be..205b22b2e 100644 --- a/internal/internal_worker.go +++ b/internal/internal_worker.go @@ -191,7 +191,7 @@ func ensureRequiredParams(params *workerExecutionParameters) { } if params.EventMonitoring.LifeCycle == nil { params.EventMonitoring.LifeCycle = debug.NewLifeCycle() - params.Logger.Debug("No PollerLifeCycle configured for cadence worker. Use default one.") + params.Logger.Debug("No LifeCycle configured for EventMonitoring option. Use default one.") } } diff --git a/internal/worker.go b/internal/worker.go index 3e4116727..5cc663fd9 100644 --- a/internal/worker.go +++ b/internal/worker.go @@ -25,7 +25,7 @@ import ( "context" "time" - "go.uber.org/cadence/debug" + "go.uber.org/cadence/internal/debug" "github.com/opentracing/opentracing-go" "github.com/uber-go/tally"