Skip to content

Commit

Permalink
Removed exception loggin in EIDSInputWedge. Added to parallelSendProd…
Browse files Browse the repository at this point in the history
…ucts
  • Loading branch information
Eric Klatzco committed May 4, 2021
1 parent f6ce6c7 commit 078deda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,12 @@ public static Map<ProductSender, Exception> parallelSendProduct(final List<Produ
sender.sendProduct(product);
sendComplete.put(sender, true);
} catch (Exception e) {
sendExceptions.put(sender, e);
if (e instanceof ProductAlreadyInStorageException) {
LOGGER.info("Product already in storage, id=" + product.getId().toString());
} else {
LOGGER.log(Level.WARNING, "[" + sender.getName() + "] error sending product", e);
sendExceptions.put(sender, e);
}
}
return null;
});
Expand Down
17 changes: 0 additions & 17 deletions src/main/java/gov/usgs/earthquake/eids/EIDSInputWedge.java
Original file line number Diff line number Diff line change
Expand Up @@ -740,15 +740,6 @@ else if (poll) {
totalFailures++;
LOGGER.severe("Total failure sending product "
+ sentId.toString());

//Iterator for specific Product Senders
Iterator<ProductSender> productSenders = sendExceptions.get(sentId)
.keySet().iterator();
while(productSenders.hasNext()) {
ProductSender productSender = productSenders.next();
LOGGER.fine("Total failure exception "
+ sendExceptions.get(sentId).get(productSender).toString());
}
} else {
// output built product id because it was sent at least
// once
Expand All @@ -760,14 +751,6 @@ else if (poll) {
partialFailures++;
LOGGER.warning("Partial failure sending product "
+ sentId.toString());

Iterator<ProductSender> productSenders = sendExceptions.get(sentId)
.keySet().iterator();
while(productSenders.hasNext()) {
ProductSender productSender = productSenders.next();
LOGGER.fine("Total failure exception "
+ sendExceptions.get(sentId).get(productSender).toString());
}
}
}
}
Expand Down

0 comments on commit 078deda

Please sign in to comment.