Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
smirnovaae committed Jun 10, 2024
1 parent 788cb09 commit 1f5de96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions optout/src/main/java/gov/cms/ab2d/optout/OptOutHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ public void processSQSMessage(SQSEvent.SQSMessage msg, Context context) {

var optOutProcessing = processorInit(logger);
var countRes = optOutProcessing.process(getFileName(notification), getBucketName(notification), ENDPOINT);

logger.log("OptOut Lambda completed. Total=" + countRes.getTotalFromDB()
+ " In=" + countRes.getOptInToday()
+ " Out=" + countRes.getOptOutToday());
if (countRes != null)
logger.log("OptOut Lambda completed. Total=" + countRes.getTotalFromDB()
+ " In=" + countRes.getOptInToday()
+ " Out=" + countRes.getOptOutToday());


} catch (Exception ex) {
Expand Down
10 changes: 2 additions & 8 deletions optout/src/main/java/gov/cms/ab2d/optout/OptOutProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ public CountResults getCountsOptOut() {
var statement = dbConnection.createStatement();
ResultSet rs = statement.executeQuery(COUNT_STATEMENT)
) {
logger.log("statement " + statement);
logger.log("RS " + rs);
while (rs.next()) {
logger.log("Inside RS");
logger.log("rs.getInt(0) " + rs.getInt("total"));
totalFromDb = rs.getInt("total");
}
//rename:
Expand All @@ -159,11 +155,9 @@ public CountResults getCountsOptOut() {
}
}
//delete
logger.log("Total = " + totalFromDb);
logger.log("numberOfYOptOuts = " + numberOfYOptOuts);
return new CountResults(totalFromDb, numberOfYOptOuts, numberOfNOptOuts);
} catch (SQLException e) {
logger.log("---------!" + e.getMessage());
} catch (SQLException ex) {
logger.log("There is an error " + ex.getMessage());
}
return null;
}
Expand Down

0 comments on commit 1f5de96

Please sign in to comment.