diff -r 4b2c8bedb094 -r 2541bdb54cb2 org/sonews/feed/PushFeeder.java --- a/org/sonews/feed/PushFeeder.java Mon Aug 24 14:40:37 2009 +0200 +++ b/org/sonews/feed/PushFeeder.java Wed Aug 26 10:47:51 2009 +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);