mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
mark all as read
This commit is contained in:
@@ -40,7 +40,7 @@ public class FeedEntryService extends GenericDAO<FeedEntry, Long> {
|
||||
}
|
||||
|
||||
private TypedQuery<FeedEntry> unreadQuery(Feed feed, User user) {
|
||||
String query = "select e from FeedEntry e where e.feed=:feed and not exists (select s from FeedEntryStatus s where s.entry = e and s.user =:user and s.read = true)";
|
||||
String query = "select e from FeedEntry e where e.feed =:feed and not exists (select s from FeedEntryStatus s where s.entry = e and s.user =:user and s.read = true)";
|
||||
TypedQuery<FeedEntry> typedQuery = em.createQuery(query,
|
||||
FeedEntry.class);
|
||||
typedQuery.setParameter("feed", feed);
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.commafeed.backend.feeds;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.ejb.Schedule;
|
||||
import javax.ejb.Singleton;
|
||||
@@ -46,7 +47,7 @@ public class FeedTimer {
|
||||
for (String key : futures.keySet()) {
|
||||
Future<Feed> future = futures.get(key);
|
||||
try {
|
||||
Feed feed = future.get();
|
||||
Feed feed = future.get(1, TimeUnit.MINUTES);
|
||||
feedEntryService
|
||||
.updateEntries(feed.getUrl(), feed.getEntries());
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user