File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ describe("schedule", () => {
60
60
minBackoffSeconds : 2 ,
61
61
maxBackoffSeconds : 3 ,
62
62
maxDoublings : 4 ,
63
+ attemptDeadline : "120s" ,
63
64
memory : "128MiB" ,
64
65
region : "us-central1" ,
65
66
} ;
@@ -73,6 +74,7 @@ describe("schedule", () => {
73
74
minBackoffSeconds : 2 ,
74
75
maxBackoffSeconds : 3 ,
75
76
maxDoublings : 4 ,
77
+ attemptDeadline : "120s" ,
76
78
} ,
77
79
opts : {
78
80
...options ,
@@ -128,6 +130,7 @@ describe("schedule", () => {
128
130
minBackoffSeconds : 11 ,
129
131
maxBackoffSeconds : 12 ,
130
132
maxDoublings : 2 ,
133
+ attemptDeadline : "120s" ,
131
134
region : "us-central1" ,
132
135
labels : { key : "val" } ,
133
136
} ,
@@ -148,7 +151,7 @@ describe("schedule", () => {
148
151
minBackoffSeconds : 11 ,
149
152
maxBackoffSeconds : 12 ,
150
153
maxDoublings : 2 ,
151
- attemptDeadline : options . RESET_VALUE ,
154
+ attemptDeadline : "120s" ,
152
155
} ,
153
156
} ,
154
157
} ) ;
@@ -181,6 +184,7 @@ describe("schedule", () => {
181
184
minBackoffSeconds : undefined ,
182
185
maxBackoffSeconds : undefined ,
183
186
maxDoublings : undefined ,
187
+ attemptDeadline : undefined ,
184
188
} ,
185
189
} ,
186
190
} ) ;
Original file line number Diff line number Diff line change @@ -61,22 +61,18 @@ export function getOpts(args: string | ScheduleOptions): SeparatedOpts {
61
61
opts : { } as options . GlobalOptions ,
62
62
} ;
63
63
}
64
- const retryConfig : any = {
65
- retryCount : args . retryCount ,
66
- maxRetrySeconds : args . maxRetrySeconds ,
67
- minBackoffSeconds : args . minBackoffSeconds ,
68
- maxBackoffSeconds : args . maxBackoffSeconds ,
69
- maxDoublings : args . maxDoublings ,
70
- } ;
71
64
72
- if ( args . attemptDeadline !== undefined ) {
73
- retryConfig . attemptDeadline = args . attemptDeadline ;
74
- }
75
-
76
65
return {
77
66
schedule : args . schedule ,
78
67
timeZone : args . timeZone ,
79
- retryConfig,
68
+ retryConfig : {
69
+ retryCount : args . retryCount ,
70
+ maxRetrySeconds : args . maxRetrySeconds ,
71
+ minBackoffSeconds : args . minBackoffSeconds ,
72
+ maxBackoffSeconds : args . maxBackoffSeconds ,
73
+ maxDoublings : args . maxDoublings ,
74
+ attemptDeadline : args . attemptDeadline ,
75
+ } ,
80
76
opts : args as options . GlobalOptions ,
81
77
} ;
82
78
}
You can’t perform that action at this time.
0 commit comments