From c253cbbd714a33130b7f20cc7e80e2c540826f66 Mon Sep 17 00:00:00 2001 From: Mike Date: Thu, 14 Dec 2023 11:54:30 +1300 Subject: [PATCH] Disable 429 specific rate limiting until Retry-After is available --- src/hdx/api/configuration.py | 3 +-- src/hdx/api/remotehdx.py | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/hdx/api/configuration.py b/src/hdx/api/configuration.py index 3a4579d..cf205d7 100755 --- a/src/hdx/api/configuration.py +++ b/src/hdx/api/configuration.py @@ -10,7 +10,6 @@ import requests from . import __version__ -from .remotehdx import RemoteHDX from hdx.utilities.dictandlist import merge_two_dictionaries from hdx.utilities.email import Email from hdx.utilities.loader import load_json, load_yaml @@ -475,7 +474,7 @@ def setup_session_remoteckan( full_agent=self.get_user_agent(), **kwargs ) if remoteckan is None: - self._remoteckan = RemoteHDX( + self._remoteckan = ckanapi.RemoteCKAN( self.get_hdx_site_url(), user_agent=user_agent, session=self._session, diff --git a/src/hdx/api/remotehdx.py b/src/hdx/api/remotehdx.py index b5f91ed..a5d5b8b 100644 --- a/src/hdx/api/remotehdx.py +++ b/src/hdx/api/remotehdx.py @@ -1,4 +1,6 @@ -"""Connection to HDX with rate limiting""" +"""Connection to HDX with rate limiting +Currently unused awaiting HDX server to add Retry-After header +""" import logging from time import sleep