Retry failed Wikidata SPARQL queries

Closes: #11
This commit is contained in:
Edward Betts 2024-02-25 18:56:46 +00:00
parent c3355c7154
commit 89fe3404aa
2 changed files with 21 additions and 1 deletions

View file

@ -106,6 +106,7 @@ def qid_to_commons_category(qid: str, check_p910: bool = True) -> str | None:
Row = dict[str, dict[str, typing.Any]]
@backoff.on_exception(backoff.expo, QueryError, max_tries=5)
def wdqs(query: str) -> list[Row]:
"""Pass query to the Wikidata Query Service."""
r = requests.post(