queue feed for refresh after a subscription

This commit is contained in:
Athou
2013-04-25 14:41:56 +02:00
parent 8944687006
commit 735c2efb34
2 changed files with 11 additions and 0 deletions

View File

@@ -37,6 +37,13 @@ public class FeedRefreshTaskGiver {
.getBackgroundThreads();
}
@Lock(LockType.WRITE)
public void add(Feed feed) {
queue.add(feed);
feed.setLastUpdated(Calendar.getInstance().getTime());
feedDAO.update(feed);
}
@Lock(LockType.WRITE)
public Feed take() {
Feed feed = queue.poll();