mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
added logging
This commit is contained in:
@@ -28,10 +28,11 @@ public class CleaningService {
|
||||
private void cleanOldStatuses() {
|
||||
Date threshold = applicationSettingsService.get().getUnreadThreshold();
|
||||
if (threshold != null) {
|
||||
log.info("cleaning old statuses");
|
||||
log.info("cleaning old read statuses");
|
||||
Query query = em.createNamedQuery("Statuses.deleteOld");
|
||||
query.setParameter("date", threshold);
|
||||
query.executeUpdate();
|
||||
int deleted = query.executeUpdate();
|
||||
log.info("cleaned {} read statuses", deleted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user