mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
moved methods around
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.commafeed.backend;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@@ -12,6 +13,7 @@ import org.slf4j.LoggerFactory;
|
||||
import com.commafeed.backend.dao.FeedDAO;
|
||||
import com.commafeed.backend.dao.FeedEntryContentDAO;
|
||||
import com.commafeed.backend.dao.FeedEntryDAO;
|
||||
import com.commafeed.backend.dao.FeedEntryStatusDAO;
|
||||
import com.commafeed.backend.dao.FeedSubscriptionDAO;
|
||||
import com.commafeed.backend.model.Feed;
|
||||
import com.commafeed.backend.model.FeedSubscription;
|
||||
@@ -33,6 +35,9 @@ public class DatabaseCleaner {
|
||||
@Inject
|
||||
FeedEntryContentDAO feedEntryContentDAO;
|
||||
|
||||
@Inject
|
||||
FeedEntryStatusDAO feedEntryStatusDAO;
|
||||
|
||||
@Inject
|
||||
ApplicationSettingsService applicationSettingsService;
|
||||
|
||||
@@ -92,4 +97,10 @@ public class DatabaseCleaner {
|
||||
}
|
||||
feedDAO.saveOrUpdate(into);
|
||||
}
|
||||
|
||||
public void cleanStatusesOlderThan(Date olderThan) {
|
||||
log.info("cleaning old read statuses");
|
||||
int deleted = feedEntryStatusDAO.deleteOldStatuses(olderThan);
|
||||
log.info("cleaned {} read statuses", deleted);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user