[fix] update_currencies.py: github CI has longer timeouts

Github action Update data - update_currencies [1]:

    ./manage pyenv.cmd python ./searxng_extra/update/update_currencies.py

fails with ``httpcore.ReadTimeout`` / the default timeout is 3sec.

[1] https://github.com/searxng/searxng/actions/runs/12076864366/job/33703464399

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2024-11-29 14:41:48 +01:00 committed by Markus Heiser
parent 2717ffd094
commit 605f38b352
2 changed files with 185 additions and 189 deletions

File diff suppressed because it is too large Load diff

View file

@ -92,6 +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))
if result is not None:
yield from result['results']['bindings']