Commit cc07773
authored
🐌 Handle MyPurdue request throttling (#78)
MyPurdue has recently started throttling incoming requests, preventing
Purdue.io CatalogSync from successfully syncing:
> We are sorry, but the site has received too many requests.
The exact behavior of the throttle logic is unclear, but brief
experimentation has revealed that after being throttled, you must wait a
minimum of 60 seconds from your last request to avoid being throttled
again.
This change implements an exponential delay with a 60-second base time
when the throttling message is received to allow the sync to complete.1 parent 3d41d75 commit cc07773
1 file changed
Lines changed: 20 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| 153 | + | |
149 | 154 | | |
150 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
151 | 158 | | |
152 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
153 | 164 | | |
| 165 | + | |
154 | 166 | | |
155 | 167 | | |
156 | 168 | | |
| |||
315 | 327 | | |
316 | 328 | | |
317 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
318 | 335 | | |
319 | 336 | | |
0 commit comments