|
|
@@ -22,8 +22,6 @@ object Utils {
|
|
|
|
|
|
r match {
|
|
|
case Success(response) =>
|
|
|
- println(endpoint, params)
|
|
|
-
|
|
|
val json = ujson.read(response.text())
|
|
|
upickle.default.read[T](json)
|
|
|
|
|
|
@@ -32,6 +30,7 @@ object Utils {
|
|
|
case exc: requests.RequestFailedException
|
|
|
if exc.response.statusCode == 429 => {
|
|
|
println("Got 429 error, retrying after 1s")
|
|
|
+ println("Don't panic, this should work again within 10-15s after the last successful request")
|
|
|
Thread.sleep(1000)
|
|
|
get_and_decode[T](endpoint, params)
|
|
|
}
|
|
|
@@ -49,4 +48,4 @@ object Utils {
|
|
|
val string = os.read(file)
|
|
|
upickle.default.read[T](string)
|
|
|
}
|
|
|
-}
|
|
|
+}
|