merge push infos into feeds

This commit is contained in:
Athou
2013-06-05 21:50:26 +02:00
parent 7943c8e1e6
commit dbe7b48a04
9 changed files with 55 additions and 187 deletions

View File

@@ -28,7 +28,6 @@ import com.commafeed.backend.dao.FeedSubscriptionDAO;
import com.commafeed.backend.model.ApplicationSettings;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedEntry;
import com.commafeed.backend.model.FeedPushInfo;
import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.backend.pubsubhubbub.SubscriptionHandler;
import com.commafeed.backend.services.ApplicationSettingsService;
@@ -163,9 +162,8 @@ public class FeedRefreshUpdater {
}
private void handlePubSub(final Feed feed) {
FeedPushInfo info = feed.getPushInfo();
if (info != null) {
Date lastPing = info.getLastPing();
if (feed.getPushHub() != null && feed.getPushTopic() != null) {
Date lastPing = feed.getPushLastPing();
Date now = Calendar.getInstance().getTime();
if (lastPing == null || lastPing.before(DateUtils.addDays(now, -3))) {
new Thread() {