mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
Revert for the moment as it breaks pubsub handling
This commit is contained in:
@@ -29,7 +29,6 @@ import com.commafeed.backend.model.FeedSubscription;
|
||||
import com.commafeed.backend.pubsubhubbub.SubscriptionHandler;
|
||||
import com.commafeed.backend.services.ApplicationSettingsService;
|
||||
import com.commafeed.backend.services.FeedUpdateService;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.util.concurrent.Striped;
|
||||
|
||||
@Singleton
|
||||
@@ -158,7 +157,7 @@ public class FeedRefreshUpdater {
|
||||
}
|
||||
|
||||
private void handlePubSub(final Feed feed) {
|
||||
FeedPushInfo info = Iterables.getFirst(feed.getPushInfo(), null);
|
||||
FeedPushInfo info = feed.getPushInfo();
|
||||
if (info != null && info.isActive() == false) {
|
||||
new Thread() {
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.commafeed.backend.model.FeedEntry;
|
||||
import com.commafeed.backend.model.FeedPushInfo;
|
||||
import com.commafeed.backend.services.ApplicationSettingsService;
|
||||
import com.commafeed.backend.services.FeedPushInfoService;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.sun.syndication.io.FeedException;
|
||||
|
||||
public class FeedRefreshWorker {
|
||||
@@ -86,6 +85,7 @@ public class FeedRefreshWorker {
|
||||
|
||||
private void update(Feed feed) {
|
||||
|
||||
|
||||
try {
|
||||
FetchedFeed fetchedFeed = fetcher.fetch(feed.getUrl(), false,
|
||||
feed.getLastModifiedHeader(), feed.getEtagHeader());
|
||||
@@ -156,11 +156,11 @@ public class FeedRefreshWorker {
|
||||
topic = "http://" + topic;
|
||||
}
|
||||
log.debug("feed {} has pubsub info: {}", feed.getUrl(), topic);
|
||||
FeedPushInfo info = Iterables.getFirst(feed.getPushInfo(), null);
|
||||
FeedPushInfo info = feed.getPushInfo();
|
||||
if (info == null) {
|
||||
info = feedPushInfoService.findOrCreate(feed, hub, topic);
|
||||
feed.getPushInfo().add(info);
|
||||
}
|
||||
feed.setPushInfo(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user