@@ -56,8 +56,7 @@ var _ Client = (*WorkflowClient)(nil)
56
56
var _ NamespaceClient = (* namespaceClient )(nil )
57
57
58
58
const (
59
- defaultDecisionTaskTimeoutInSecs = 10
60
- defaultGetHistoryTimeoutInSecs = 25
59
+ defaultGetHistoryTimeoutInSecs = 65
61
60
)
62
61
63
62
var (
@@ -167,22 +166,8 @@ func (wc *WorkflowClient) StartWorkflow(
167
166
workflowID = uuid .NewRandom ().String ()
168
167
}
169
168
170
- if options .TaskList == "" {
171
- return nil , errors .New ("missing TaskList" )
172
- }
173
-
174
169
executionTimeout := common .Int32Ceil (options .ExecutionStartToCloseTimeout .Seconds ())
175
- if executionTimeout <= 0 {
176
- return nil , errors .New ("missing or invalid ExecutionStartToCloseTimeout" )
177
- }
178
-
179
170
decisionTaskTimeout := common .Int32Ceil (options .DecisionTaskStartToCloseTimeout .Seconds ())
180
- if decisionTaskTimeout < 0 {
181
- return nil , errors .New ("negative DecisionTaskStartToCloseTimeout provided" )
182
- }
183
- if decisionTaskTimeout == 0 {
184
- decisionTaskTimeout = defaultDecisionTaskTimeoutInSecs
185
- }
186
171
187
172
// Validate type and its arguments.
188
173
workflowType , input , err := getValidatedWorkflowFunction (workflowFunc , args , wc .dataConverter , wc .registry )
@@ -364,22 +349,8 @@ func (wc *WorkflowClient) SignalWithStartWorkflow(ctx context.Context, workflowI
364
349
workflowID = uuid .NewRandom ().String ()
365
350
}
366
351
367
- if options .TaskList == "" {
368
- return nil , errors .New ("missing TaskList" )
369
- }
370
-
371
352
executionTimeout := common .Int32Ceil (options .ExecutionStartToCloseTimeout .Seconds ())
372
- if executionTimeout <= 0 {
373
- return nil , errors .New ("missing or invalid ExecutionStartToCloseTimeout" )
374
- }
375
-
376
353
decisionTaskTimeout := common .Int32Ceil (options .DecisionTaskStartToCloseTimeout .Seconds ())
377
- if decisionTaskTimeout < 0 {
378
- return nil , errors .New ("negative DecisionTaskStartToCloseTimeout provided" )
379
- }
380
- if decisionTaskTimeout == 0 {
381
- decisionTaskTimeout = defaultDecisionTaskTimeoutInSecs
382
- }
383
354
384
355
// Validate type and its arguments.
385
356
workflowType , input , err := getValidatedWorkflowFunction (workflowFunc , workflowArgs , wc .dataConverter , wc .registry )
@@ -620,7 +591,7 @@ func (wc *WorkflowClient) RecordActivityHeartbeatByID(ctx context.Context,
620
591
// - InternalServiceError
621
592
// - EntityNotExistError
622
593
func (wc * WorkflowClient ) ListClosedWorkflow (ctx context.Context , request * workflowservice.ListClosedWorkflowExecutionsRequest ) (* workflowservice.ListClosedWorkflowExecutionsResponse , error ) {
623
- if len ( request .GetNamespace ()) == 0 {
594
+ if request .GetNamespace () == "" {
624
595
request .Namespace = wc .namespace
625
596
}
626
597
var response * workflowservice.ListClosedWorkflowExecutionsResponse
@@ -644,7 +615,7 @@ func (wc *WorkflowClient) ListClosedWorkflow(ctx context.Context, request *workf
644
615
// - InternalServiceError
645
616
// - EntityNotExistError
646
617
func (wc * WorkflowClient ) ListOpenWorkflow (ctx context.Context , request * workflowservice.ListOpenWorkflowExecutionsRequest ) (* workflowservice.ListOpenWorkflowExecutionsResponse , error ) {
647
- if len ( request .GetNamespace ()) == 0 {
618
+ if request .GetNamespace () == "" {
648
619
request .Namespace = wc .namespace
649
620
}
650
621
var response * workflowservice.ListOpenWorkflowExecutionsResponse
@@ -664,7 +635,7 @@ func (wc *WorkflowClient) ListOpenWorkflow(ctx context.Context, request *workflo
664
635
665
636
// ListWorkflow implementation
666
637
func (wc * WorkflowClient ) ListWorkflow (ctx context.Context , request * workflowservice.ListWorkflowExecutionsRequest ) (* workflowservice.ListWorkflowExecutionsResponse , error ) {
667
- if len ( request .GetNamespace ()) == 0 {
638
+ if request .GetNamespace () == "" {
668
639
request .Namespace = wc .namespace
669
640
}
670
641
var response * workflowservice.ListWorkflowExecutionsResponse
@@ -684,7 +655,7 @@ func (wc *WorkflowClient) ListWorkflow(ctx context.Context, request *workflowser
684
655
685
656
// ListArchivedWorkflow implementation
686
657
func (wc * WorkflowClient ) ListArchivedWorkflow (ctx context.Context , request * workflowservice.ListArchivedWorkflowExecutionsRequest ) (* workflowservice.ListArchivedWorkflowExecutionsResponse , error ) {
687
- if len ( request .GetNamespace ()) == 0 {
658
+ if request .GetNamespace () == "" {
688
659
request .Namespace = wc .namespace
689
660
}
690
661
var response * workflowservice.ListArchivedWorkflowExecutionsResponse
@@ -716,7 +687,7 @@ func (wc *WorkflowClient) ListArchivedWorkflow(ctx context.Context, request *wor
716
687
717
688
// ScanWorkflow implementation
718
689
func (wc * WorkflowClient ) ScanWorkflow (ctx context.Context , request * workflowservice.ScanWorkflowExecutionsRequest ) (* workflowservice.ScanWorkflowExecutionsResponse , error ) {
719
- if len ( request .GetNamespace ()) == 0 {
690
+ if request .GetNamespace () == "" {
720
691
request .Namespace = wc .namespace
721
692
}
722
693
var response * workflowservice.ScanWorkflowExecutionsResponse
@@ -736,7 +707,7 @@ func (wc *WorkflowClient) ScanWorkflow(ctx context.Context, request *workflowser
736
707
737
708
// CountWorkflow implementation
738
709
func (wc * WorkflowClient ) CountWorkflow (ctx context.Context , request * workflowservice.CountWorkflowExecutionsRequest ) (* workflowservice.CountWorkflowExecutionsResponse , error ) {
739
- if len ( request .GetNamespace ()) == 0 {
710
+ if request .GetNamespace () == "" {
740
711
request .Namespace = wc .namespace
741
712
}
742
713
var response * workflowservice.CountWorkflowExecutionsResponse
0 commit comments