diff --git a/productnameextractor/src/main/java/dictionary/ProductDictionary.java b/productnameextractor/src/main/java/dictionary/ProductDictionary.java index 30e81aef0..d996bad13 100644 --- a/productnameextractor/src/main/java/dictionary/ProductDictionary.java +++ b/productnameextractor/src/main/java/dictionary/ProductDictionary.java @@ -120,10 +120,11 @@ public static void initializeProductDict(){ final long timeSinceLastFullPull = Duration.between(productDictLastCompilationDate, Instant.now()).getSeconds(); final long timeSinceLastRefresh = Duration.between(productDictLastRefreshDate, Instant.now()).getSeconds(); - logger.info("Successfully read {} products from file '{}' ({} day(s) old)", + logger.info("Successfully read {} products from file '{}' ({} day(s) since refresh, {} day(s) since full query)", productDict.size(), - productDictName, - Math.floor((float) timeSinceLastRefresh / 3600 / 24 * 10) / 10 // seconds -> hours + productDictPath, + Math.floor((float) timeSinceLastRefresh / 3600 / 24 * 10) / 10, // seconds -> hours + Math.floor((float) timeSinceLastFullPull / 3600 / 24 * 10) / 10 // seconds -> hours ); // Update dictionary as needed diff --git a/productnameextractor/src/main/java/messenger/Messenger.java b/productnameextractor/src/main/java/messenger/Messenger.java index 75007afea..0e25bfa94 100644 --- a/productnameextractor/src/main/java/messenger/Messenger.java +++ b/productnameextractor/src/main/java/messenger/Messenger.java @@ -88,10 +88,13 @@ public void run() { Connection connection = factory.newConnection(); Channel channel = connection.createChannel(); - // TODO: Needed? - channel.queueDeclare(inputQueue, true, false, false, null); - channel.queueDeclare(patchFinderOutputQueue, true, false, false, null); - channel.queueDeclare(fixFinderOutputQueue, true, false, false, null); + channel.queueDeclareNoWait(inputQueue, true, false, false, null); + channel.queueDeclareNoWait(patchFinderOutputQueue, true, false, false, null); + channel.queueDeclareNoWait(fixFinderOutputQueue, true, false, false, null); + // TODO: Remove when queue issue is resolved (errors thrown likely when producer does not receive info from consumer) +// channel.queueDeclare(inputQueue, true, false, false, null); +// channel.queueDeclare(patchFinderOutputQueue, true, false, false, null); +// channel.queueDeclare(fixFinderOutputQueue, true, false, false, null); channel.basicConsume(inputQueue, false, new DefaultConsumer(channel) { @Override