Commit 39c3b2d
authored
fix (datafile management): Update polling behavior (#266)
Summary:
- When autoUpdate is true, start the timer for the following request immediately, instead of waiting for the response to start the timer
- When the timeout fires before the response is received, wait for the response to complete and then start the next request immediately. This ensures there is at most 1 request in flight at any time.
Test plan:
Added new unit tests. Manually tested.
Issues:
https://optimizely.atlassian.net/browse/OASIS-46281 parent 27f4159 commit 39c3b2d
File tree
3 files changed
+62
-13
lines changed- packages/datafile-manager
- __test__
- src
3 files changed
+62
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
12 | 15 | | |
13 | 16 | | |
14 | 17 | | |
| |||
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
231 | 230 | | |
232 | | - | |
233 | 231 | | |
234 | | - | |
235 | 232 | | |
236 | 233 | | |
237 | 234 | | |
| |||
278 | 275 | | |
279 | 276 | | |
280 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
281 | 308 | | |
282 | 309 | | |
283 | 310 | | |
| |||
Lines changed: 28 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
117 | 123 | | |
118 | 124 | | |
119 | 125 | | |
| 126 | + | |
| 127 | + | |
120 | 128 | | |
| 129 | + | |
121 | 130 | | |
122 | 131 | | |
123 | 132 | | |
| |||
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
141 | | - | |
| 150 | + | |
142 | 151 | | |
143 | 152 | | |
144 | 153 | | |
145 | 154 | | |
146 | 155 | | |
147 | 156 | | |
148 | | - | |
| 157 | + | |
149 | 158 | | |
150 | 159 | | |
151 | 160 | | |
| |||
209 | 218 | | |
210 | 219 | | |
211 | 220 | | |
212 | | - | |
| 221 | + | |
213 | 222 | | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | 223 | | |
218 | 224 | | |
219 | 225 | | |
220 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
221 | 232 | | |
222 | 233 | | |
223 | 234 | | |
| |||
241 | 252 | | |
242 | 253 | | |
243 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
244 | 259 | | |
245 | 260 | | |
246 | 261 | | |
| |||
258 | 273 | | |
259 | 274 | | |
260 | 275 | | |
261 | | - | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
262 | 281 | | |
263 | 282 | | |
264 | 283 | | |
| |||
0 commit comments