Skip to content

Commit

Permalink
Allow empty active cluster when register domain (cadence-workflow#2201)
Browse files Browse the repository at this point in the history
  • Loading branch information
wxing1292 authored Jul 12, 2019
1 parent 8b901af commit 281d152
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/cli/domainCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ func RegisterDomain(c *cli.Context) {
}
}

var activeClusterName string
var activeClusterName *string
if c.IsSet(FlagActiveClusterName) {
activeClusterName = c.String(FlagActiveClusterName)
activeClusterName = common.StringPtr(c.String(FlagActiveClusterName))
}

var clusters []*shared.ClusterReplicationConfiguration
if c.IsSet(FlagClusters) {
clusterStr := c.String(FlagClusters)
Expand All @@ -104,7 +105,7 @@ func RegisterDomain(c *cli.Context) {
WorkflowExecutionRetentionPeriodInDays: common.Int32Ptr(int32(retentionDays)),
EmitMetric: common.BoolPtr(emitMetric),
Clusters: clusters,
ActiveClusterName: common.StringPtr(activeClusterName),
ActiveClusterName: activeClusterName,
SecurityToken: common.StringPtr(securityToken),
ArchivalStatus: archivalStatus(c),
ArchivalBucketName: common.StringPtr(c.String(FlagArchivalBucketName)),
Expand Down

0 comments on commit 281d152

Please sign in to comment.