From 15d3cc6fbcb106a869a299807c7c405b7cb15efe Mon Sep 17 00:00:00 2001 From: Arturo Volpe Date: Thu, 7 Mar 2024 16:57:26 -0300 Subject: [PATCH] fix: GNB exchange url Signed-off-by: Arturo Volpe --- .../com/volpe/cotizacion/GathererManager.java | 17 +++++++++++++++-- .../py/com/volpe/cotizacion/gatherer/GNB.java | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/main/java/py/com/volpe/cotizacion/GathererManager.java b/src/main/java/py/com/volpe/cotizacion/GathererManager.java index 3400541..6b60156 100644 --- a/src/main/java/py/com/volpe/cotizacion/GathererManager.java +++ b/src/main/java/py/com/volpe/cotizacion/GathererManager.java @@ -1,6 +1,5 @@ package py.com.volpe.cotizacion; -import lombok.AllArgsConstructor; import lombok.extern.log4j.Log4j2; import org.springframework.data.util.Pair; import org.springframework.stereotype.Service; @@ -30,7 +29,6 @@ * @since 5/2/18 */ @Service -@AllArgsConstructor @Log4j2 public class GathererManager { @@ -39,6 +37,21 @@ public class GathererManager { private final ExecutionRepository executionRepository; private final QueryResponseRepository queryResponseRepository; + public GathererManager(List gathererList, PlaceRepository placeRepository, ExecutionRepository executionRepository, QueryResponseRepository queryResponseRepository) { + + this.gathererList = gathererList; + this.placeRepository = placeRepository; + this.executionRepository = executionRepository; + this.queryResponseRepository = queryResponseRepository; + + log.info(""" + Staring GathererManager, available gatherers: + + \t- '{}' + """, this.gathererList + .stream().map(g -> g.getCode()).collect(Collectors.joining("'\n\t- '"))); + } + /** * This is in charge of initializing the database (place and branches). * diff --git a/src/main/java/py/com/volpe/cotizacion/gatherer/GNB.java b/src/main/java/py/com/volpe/cotizacion/gatherer/GNB.java index 9e44639..867ddcc 100644 --- a/src/main/java/py/com/volpe/cotizacion/gatherer/GNB.java +++ b/src/main/java/py/com/volpe/cotizacion/gatherer/GNB.java @@ -27,7 +27,7 @@ public class GNB implements Gatherer { private final HTTPHelper helper; - private static final String WS_URL = "https://www.bancognb.com.py/Yaguarete/public/quotations"; + private static final String WS_URL = "https://www.bancognb.com.py/public/currency_quotations"; @Override public List doQuery(Place place, List branches) {