From 043b1df585ac47956ad401171574a9ac98509c81 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 21 Mar 2014 00:25:20 +0100 Subject: [PATCH] more logging --- .../commafeed/backend/services/DatabaseCleaningService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/commafeed/backend/services/DatabaseCleaningService.java b/src/main/java/com/commafeed/backend/services/DatabaseCleaningService.java index 68ac1356..3186a7ca 100644 --- a/src/main/java/com/commafeed/backend/services/DatabaseCleaningService.java +++ b/src/main/java/com/commafeed/backend/services/DatabaseCleaningService.java @@ -49,14 +49,13 @@ public class DatabaseCleaningService { public long cleanFeedsWithoutSubscriptions() { log.info("cleaning feeds without subscriptions"); long total = 0; - long totalEntries = 0; int deleted = 0; do { List feeds = feedDAO.findWithoutSubscriptions(1); - totalEntries += cleanEntriesForFeedsWithoutSubscriptions(feeds); + cleanEntriesForFeedsWithoutSubscriptions(feeds); deleted = feedDAO.delete(feeds); total += deleted; - log.info("removed {} feeds without subscriptions ({} entries)", total, totalEntries); + log.info("removed {} feeds without subscriptions", total); } while (deleted != 0); log.info("cleanup done: {} feeds without subscriptions deleted", total); return total; @@ -69,6 +68,7 @@ public class DatabaseCleaningService { do { deleted = feedEntryDAO.delete(feed, BATCH_SIZE); total += deleted; + log.info("removed {} entries for feed {}", total, feed.getId()); } while (deleted != 0); } return total;