[fix] wikidata: increase wikidata queries timeout

The big queries for initializing and updating the currencies take longer than
the default of the wikidata engine, which is only 3sec.

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2025-03-01 10:49:11 +01:00 committed by Markus Heiser
parent 30a820437d
commit 1d16b94279
5 changed files with 38 additions and 18 deletions

View file

@ -92,8 +92,7 @@ def add_currency_label(db, label, iso4217, language):
def wikidata_request_result_iterator(request):
wikidata.timeout = 30 # github CI has longer timeouts
result = wikidata.send_wikidata_query(request.replace('%LANGUAGES_SPARQL%', LANGUAGES_SPARQL))
result = wikidata.send_wikidata_query(request.replace('%LANGUAGES_SPARQL%', LANGUAGES_SPARQL), timeout=20)
if result is not None:
yield from result['results']['bindings']