diff -r f2293e8566f5 -r d879bab39600 org/sonews/feed/PushFeeder.java --- a/org/sonews/feed/PushFeeder.java Thu Aug 20 18:41:21 2009 +0200 +++ b/org/sonews/feed/PushFeeder.java Tue Apr 27 22:11:30 2010 +0200 @@ -19,9 +19,13 @@ package org.sonews.feed; import java.io.IOException; +import java.util.List; import java.util.concurrent.ConcurrentLinkedQueue; +import org.sonews.daemon.AbstractDaemon; import org.sonews.storage.Article; import org.sonews.storage.Headers; +import org.sonews.storage.StorageBackendException; +import org.sonews.storage.StorageManager; import org.sonews.util.Log; import org.sonews.util.io.ArticleWriter; @@ -31,7 +35,7 @@ * @author Christian Lins * @since sonews/0.5.0 */ -class PushFeeder extends AbstractFeeder +class PushFeeder extends AbstractDaemon { private ConcurrentLinkedQueue
articleQueue = @@ -49,10 +53,13 @@ this.wait(); } + List subscriptions = StorageManager.current() + .getSubscriptions(FeedManager.TYPE_PUSH); + Article article = this.articleQueue.poll(); String[] groups = article.getHeader(Headers.NEWSGROUPS)[0].split(","); Log.get().info("PushFeed: " + article.getMessageID()); - for(Subscription sub : this.subscriptions) + for(Subscription sub : subscriptions) { // Circle check if(article.getHeader(Headers.PATH)[0].contains(sub.getHost())) @@ -88,6 +95,10 @@ } } } + catch(StorageBackendException ex) + { + Log.get().severe(ex.toString()); + } catch(InterruptedException ex) { Log.get().warning("PushFeeder interrupted: " + ex);