Commit 2f2ebd5
authored
Enable configuring HTTP transport retry behavior and add
This PR includes two distinct changes.
- Adds a new parameter `http_transport_retries` to the `Groundlight`
constructor, enabling the retry behavior to be modified when
initializing a `Groundlight` instance.
- The retry behavior specified will apply to all API requests made
through the `Groundlight` instance.
- Currently no way is provided to configure the retry behavior
per-request, or to change it once the `Groundlight` instance has been
initialized (this is technically possible but awkward).
- I added a test to verify that we can pass the parameter in and it gets
passed through to the inner API client.
- Adds a `request_timeout` parameter to the `get_detector` method which
enables changing the request timeout values for the request.
- An identical parameter was previously added for `submit_image_query`.
Eventually I think we'll want to make this available for all methods,
but for now we don't need that.
- I added a test to verify that this parameter works properly.
These changes are intended to be utilized by the edge endpoint to
improve behavior under poor network connectivity.request_timeout parameter to get_detector (#386)1 parent af36416 commit 2f2ebd5
File tree
3 files changed
+64
-16
lines changed- src/groundlight
- test/integration
3 files changed
+64
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| 137 | + | |
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
141 | 143 | | |
142 | | - | |
| 144 | + | |
143 | 145 | | |
144 | | - | |
145 | | - | |
| 146 | + | |
| 147 | + | |
146 | 148 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
156 | 162 | | |
157 | 163 | | |
158 | 164 | | |
| |||
264 | 270 | | |
265 | 271 | | |
266 | 272 | | |
267 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
268 | 278 | | |
269 | 279 | | |
270 | 280 | | |
| |||
275 | 285 | | |
276 | 286 | | |
277 | 287 | | |
| 288 | + | |
| 289 | + | |
278 | 290 | | |
279 | 291 | | |
280 | 292 | | |
| |||
283 | 295 | | |
284 | 296 | | |
285 | 297 | | |
286 | | - | |
| 298 | + | |
| 299 | + | |
287 | 300 | | |
288 | 301 | | |
289 | 302 | | |
| |||
662 | 675 | | |
663 | 676 | | |
664 | 677 | | |
665 | | - | |
| 678 | + | |
666 | 679 | | |
667 | 680 | | |
668 | 681 | | |
| |||
744 | 757 | | |
745 | 758 | | |
746 | 759 | | |
747 | | - | |
748 | | - | |
| 760 | + | |
| 761 | + | |
749 | 762 | | |
750 | 763 | | |
751 | 764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
80 | 81 | | |
81 | 82 | | |
82 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
83 | 99 | | |
84 | 100 | | |
85 | 101 | | |
| |||
222 | 238 | | |
223 | 239 | | |
224 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
225 | 256 | | |
226 | 257 | | |
227 | 258 | | |
| |||
352 | 383 | | |
353 | 384 | | |
354 | 385 | | |
355 | | - | |
356 | | - | |
| 386 | + | |
| 387 | + | |
357 | 388 | | |
358 | | - | |
| 389 | + | |
359 | 390 | | |
360 | 391 | | |
361 | 392 | | |
362 | 393 | | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
363 | 398 | | |
364 | 399 | | |
365 | 400 | | |
| |||
0 commit comments