File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -71,8 +71,14 @@ func (adapt *Adapter) FromJobProto(spec *pb.JobSpecification) (models.JobSpec, e
7171 }
7272
7373 retryDelay := time .Duration (0 )
74- if spec .Behavior != nil && spec .Behavior .Retry .Delay != nil && spec .Behavior .Retry .Delay .IsValid () {
75- retryDelay = spec .Behavior .Retry .Delay .AsDuration ()
74+ retryCount := 0
75+ retryExponentialBackoff := false
76+ if spec .Behavior != nil && spec .Behavior .Retry != nil {
77+ retryCount = int (spec .Behavior .Retry .Count )
78+ retryExponentialBackoff = spec .Behavior .Retry .ExponentialBackoff
79+ if spec .Behavior .Retry .Delay != nil && spec .Behavior .Retry .Delay .IsValid () {
80+ retryDelay = spec .Behavior .Retry .Delay .AsDuration ()
81+ }
7682 }
7783 return models.JobSpec {
7884 Version : int (spec .Version ),
@@ -90,9 +96,9 @@ func (adapt *Adapter) FromJobProto(spec *pb.JobSpecification) (models.JobSpec, e
9096 DependsOnPast : spec .DependsOnPast ,
9197 CatchUp : spec .CatchUp ,
9298 Retry : models.JobSpecBehaviorRetry {
93- Count : int ( spec . Behavior . Retry . Count ) ,
99+ Count : retryCount ,
94100 Delay : retryDelay ,
95- ExponentialBackoff : spec . Behavior . Retry . ExponentialBackoff ,
101+ ExponentialBackoff : retryExponentialBackoff ,
96102 },
97103 },
98104 Task : models.JobSpecTask {
You can’t perform that action at this time.
0 commit comments