Skip to content

Commit

Permalink
Fix canary domain creation (cadence-workflow#3173)
Browse files Browse the repository at this point in the history
  • Loading branch information
yycptt authored Apr 8, 2020
1 parent 7fe008e commit 62ef53d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions canary/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type cadenceClient struct {
// if the domain already exist, this method silently returns success
func (client *cadenceClient) createDomain(name string, desc string, owner string, archivalStatus *shared.ArchivalStatus) error {
emitMetric := true
isGlobalDomain := false
retention := int32(workflowRetentionDays)
if archivalStatus != nil && *archivalStatus == shared.ArchivalStatusEnabled {
retention = int32(0)
Expand All @@ -59,6 +60,8 @@ func (client *cadenceClient) createDomain(name string, desc string, owner string
WorkflowExecutionRetentionPeriodInDays: &retention,
EmitMetric: &emitMetric,
HistoryArchivalStatus: archivalStatus,
VisibilityArchivalStatus: archivalStatus,
IsGlobalDomain: &isGlobalDomain,
}
err := client.Register(context.Background(), req)
if err != nil {
Expand Down

0 comments on commit 62ef53d

Please sign in to comment.