mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
initial metrics system
This commit is contained in:
@@ -10,6 +10,7 @@ import javax.ejb.LockType;
|
||||
import javax.ejb.Singleton;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import com.commafeed.backend.MetricsBean;
|
||||
import com.commafeed.backend.StartupBean;
|
||||
import com.commafeed.backend.dao.FeedDAO;
|
||||
import com.commafeed.backend.model.Feed;
|
||||
@@ -28,6 +29,9 @@ public class FeedRefreshTaskGiver {
|
||||
@Inject
|
||||
StartupBean startupBean;
|
||||
|
||||
@Inject
|
||||
MetricsBean metricsBean;
|
||||
|
||||
private Queue<Feed> queue = Queues.newConcurrentLinkedQueue();
|
||||
|
||||
@Lock(LockType.WRITE)
|
||||
@@ -49,6 +53,7 @@ public class FeedRefreshTaskGiver {
|
||||
}
|
||||
feedDAO.update(feeds);
|
||||
}
|
||||
metricsBean.feedRefreshed();
|
||||
return queue.poll();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user