forked from Archives/Athou_commafeed
fix metrics
This commit is contained in:
@@ -55,13 +55,11 @@ public class MetricsBean {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void entryUpdated(int statusesCount) {
|
public void entryInserted() {
|
||||||
|
|
||||||
thisHour.entriesInserted++;
|
thisHour.entriesInserted++;
|
||||||
thisMinute.entriesInserted++;
|
thisMinute.entriesInserted++;
|
||||||
|
|
||||||
thisHour.statusesInserted += statusesCount;
|
|
||||||
thisMinute.statusesInserted += statusesCount;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void entryCacheHit() {
|
public void entryCacheHit() {
|
||||||
@@ -107,7 +105,6 @@ public class MetricsBean {
|
|||||||
private int feedsRefreshed;
|
private int feedsRefreshed;
|
||||||
private int feedsUpdated;
|
private int feedsUpdated;
|
||||||
private int entriesInserted;
|
private int entriesInserted;
|
||||||
private int statusesInserted;
|
|
||||||
private int threadWaited;
|
private int threadWaited;
|
||||||
private int pushNotificationsReceived;
|
private int pushNotificationsReceived;
|
||||||
private int pushFeedsQueued;
|
private int pushFeedsQueued;
|
||||||
@@ -138,14 +135,6 @@ public class MetricsBean {
|
|||||||
this.entriesInserted = entriesInserted;
|
this.entriesInserted = entriesInserted;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getStatusesInserted() {
|
|
||||||
return statusesInserted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setStatusesInserted(int statusesInserted) {
|
|
||||||
this.statusesInserted = statusesInserted;
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getThreadWaited() {
|
public int getThreadWaited() {
|
||||||
return threadWaited;
|
return threadWaited;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ public class FeedUpdateService {
|
|||||||
users.add(user);
|
users.add(user);
|
||||||
}
|
}
|
||||||
feedEntryDAO.saveOrUpdate(entry);
|
feedEntryDAO.saveOrUpdate(entry);
|
||||||
|
metricsBean.entryInserted();
|
||||||
cache.invalidateUserData(users.toArray(new User[0]));
|
cache.invalidateUserData(users.toArray(new User[0]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user