Skip to content

Commit 1f7ec74

Browse files
authored
fix(worker): fix temporal cloud namespace init (#181)
Because - we can't programmatically list namespace in Temporal Cloud (i.e., `tcld` is the current only way to pass the authentication) This commit - bypass the initialisation of namespace for Temporal Cloud route
1 parent 4a7d3c2 commit 1f7ec74

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/worker/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ func main() {
126126
}
127127
defer temporalClient.Close()
128128

129-
initTemporalNamespace(ctx, temporalClient)
129+
// for only local temporal cluster
130+
if config.Config.Temporal.Ca == "" && config.Config.Temporal.Cert == "" && config.Config.Temporal.Key == "" {
131+
initTemporalNamespace(ctx, temporalClient)
132+
}
130133

131134
w := worker.New(temporalClient, mgmtWorker.TaskQueue, worker.Options{
132135
MaxConcurrentActivityExecutionSize: 2,

0 commit comments

Comments
 (0)