increment feed update metric only when we actually update the feed

This commit is contained in:
Athou
2013-05-25 15:39:54 +02:00
parent 8a79ebd3e5
commit 8adcd35cb4
2 changed files with 5 additions and 1 deletions

View File

@@ -85,7 +85,6 @@ public class FeedRefreshTaskGiver {
}
public void giveBack(Feed feed) {
metricsBean.feedUpdated();
giveBackQueue.add(feed);
}

View File

@@ -15,6 +15,7 @@ import javax.inject.Singleton;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.commafeed.backend.MetricsBean;
import com.commafeed.backend.dao.FeedDAO;
import com.commafeed.backend.dao.FeedSubscriptionDAO;
import com.commafeed.backend.model.ApplicationSettings;
@@ -52,6 +53,9 @@ public class FeedRefreshUpdater {
@Inject
ApplicationSettingsService applicationSettingsService;
@Inject
MetricsBean metricsBean;
@Inject
FeedSubscriptionDAO feedSubscriptionDAO;
@@ -118,6 +122,7 @@ public class FeedRefreshUpdater {
if (applicationSettingsService.get().isPubsubhubbub()) {
handlePubSub(feed);
}
metricsBean.feedUpdated();
taskGiver.giveBack(feed);
}