mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
more logging
This commit is contained in:
@@ -49,14 +49,13 @@ public class DatabaseCleaningService {
|
|||||||
public long cleanFeedsWithoutSubscriptions() {
|
public long cleanFeedsWithoutSubscriptions() {
|
||||||
log.info("cleaning feeds without subscriptions");
|
log.info("cleaning feeds without subscriptions");
|
||||||
long total = 0;
|
long total = 0;
|
||||||
long totalEntries = 0;
|
|
||||||
int deleted = 0;
|
int deleted = 0;
|
||||||
do {
|
do {
|
||||||
List<Feed> feeds = feedDAO.findWithoutSubscriptions(1);
|
List<Feed> feeds = feedDAO.findWithoutSubscriptions(1);
|
||||||
totalEntries += cleanEntriesForFeedsWithoutSubscriptions(feeds);
|
cleanEntriesForFeedsWithoutSubscriptions(feeds);
|
||||||
deleted = feedDAO.delete(feeds);
|
deleted = feedDAO.delete(feeds);
|
||||||
total += deleted;
|
total += deleted;
|
||||||
log.info("removed {} feeds without subscriptions ({} entries)", total, totalEntries);
|
log.info("removed {} feeds without subscriptions", total);
|
||||||
} while (deleted != 0);
|
} while (deleted != 0);
|
||||||
log.info("cleanup done: {} feeds without subscriptions deleted", total);
|
log.info("cleanup done: {} feeds without subscriptions deleted", total);
|
||||||
return total;
|
return total;
|
||||||
@@ -69,6 +68,7 @@ public class DatabaseCleaningService {
|
|||||||
do {
|
do {
|
||||||
deleted = feedEntryDAO.delete(feed, BATCH_SIZE);
|
deleted = feedEntryDAO.delete(feed, BATCH_SIZE);
|
||||||
total += deleted;
|
total += deleted;
|
||||||
|
log.info("removed {} entries for feed {}", total, feed.getId());
|
||||||
} while (deleted != 0);
|
} while (deleted != 0);
|
||||||
}
|
}
|
||||||
return total;
|
return total;
|
||||||
|
|||||||
Reference in New Issue
Block a user