Skip to content
Snippets Groups Projects

refactor: GNRG 6847 retry request refactoring

7 files
+ 0
54
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -24,7 +24,6 @@ from typing import Any, List, Optional, Tuple, Union
import jsonschema
import requests
import tenacity
from dateutil import parser as date_parser
from jsonschema import FormatChecker, exceptions
from osdu_api.auth.authorization import TokenRefresher, authorize
@@ -144,11 +143,6 @@ class SchemaValidator(HeadersMixin):
if schema_part.get("MasterData"):
schema_part["MasterData"] = {}
@tenacity.retry(
wait=tenacity.wait_fixed(TIMEOUT),
stop=tenacity.stop_after_attempt(RETRIES),
reraise=True
)
@lru_cache()
def get_schema(self, kind: str) -> Union[dict, None]:
"""Fetch schema from Schema service.
Loading