Timeout de conexión a API REST a 120 segundos

This commit is contained in:
David Arranz 2026-04-21 18:35:08 +02:00
parent 3d52b0c112
commit 34fc389da9
2 changed files with 5 additions and 5 deletions

View File

@ -21,7 +21,7 @@ def estado_factura(uuid_str: str,
- error: mensaje de error si algo falló
"""
url = config['VERIFACTU_BASE_URL'] + "/verifactu/status"
timeout: int = 10
timeout: int = 120
headers = {"Content-Type": "application/json",
"Accept": "application/json"}
headers["Authorization"] = "Bearer " + config['VERIFACTU_API_KEY']
@ -76,7 +76,7 @@ def crear_factura_verifacti(payload,
- error: mensaje de error si algo falló
"""
url = config['VERIFACTU_BASE_URL'] + "/verifactu/create"
timeout: int = 10
timeout: int = 120
headers = {"Content-Type": "application/json",
"Accept": "application/json"}
headers["Authorization"] = "Bearer " + config['VERIFACTU_API_KEY']
@ -133,7 +133,7 @@ def validar_nif_verifacti(
- error: mensaje de error si algo falló
"""
url = config['VERIFACTU_BASE_URL'] + "/nifs/validar"
timeout: int = 10
timeout: int = 120
headers = {"Content-Type": "application/json",
"Accept": "application/json"}
headers["Authorization"] = "Bearer " + config['VERIFACTU_NIFS_API_KEY']
@ -170,7 +170,7 @@ def insert_invoice_REST_API_FACTUGES(
"""
url = "http://192.168.0.104:3002/api/v1/factuges"
timeout: int = 10
timeout: int = 120
headers = {"Content-Type": "application/json",
"Accept": "application/json"}
"""headers["Authorization"] = "Bearer " + config['VERIFACTU_NIFS_API_KEY']

View File

@ -1,6 +1,6 @@
[metadata]
name = factuges-sync
version = 0.1.7
version = 0.1.8
description = ETL job to sync data from legacy DB to MariaDB
author = Rodax Software
author_email = info@rodax-software.com