mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding refresh and counts back into analytics.
This commit is contained in:
parent
8af879269b
commit
17c8584015
5 changed files with 6 additions and 9 deletions
|
@ -7,8 +7,9 @@ class AppServers(View):
|
|||
|
||||
def get(self, request):
|
||||
data = dict((("%s" % s['_id'].replace('-', ''), s['feeds']) for s in self.stats))
|
||||
#if self.total:
|
||||
# data['total'] = self.total[0]['feeds']
|
||||
#total = self.total:
|
||||
# if total:
|
||||
# data['total'] = total[0]['feeds']
|
||||
chart_name = "app_servers"
|
||||
chart_type = "counter"
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ class AppTimes(View):
|
|||
|
||||
@property
|
||||
def stats(self):
|
||||
|
||||
|
||||
stats = settings.MONGOANALYTICSDB.nbanalytics.page_loads.aggregate([{
|
||||
"$match": {
|
||||
"date": {
|
||||
|
|
|
@ -41,7 +41,6 @@ class TasksServers(View):
|
|||
|
||||
@property
|
||||
def total(self):
|
||||
|
||||
stats = settings.MONGOANALYTICSDB.nbanalytics.feed_fetches.aggregate([{
|
||||
"$match": {
|
||||
"date": {
|
||||
|
|
|
@ -24,7 +24,6 @@ class TasksTimes(View):
|
|||
|
||||
@property
|
||||
def stats(self):
|
||||
|
||||
stats = settings.MONGOANALYTICSDB.nbanalytics.feed_fetches.aggregate([{
|
||||
"$match": {
|
||||
"date": {
|
||||
|
|
|
@ -554,7 +554,7 @@ def refresh_feeds(request):
|
|||
(end-start).total_seconds(),
|
||||
))
|
||||
|
||||
# MAnalyticsLoader.add(page_load=time.time()-start_time)
|
||||
MAnalyticsLoader.add(page_load=time.time()-start_time)
|
||||
|
||||
return {
|
||||
'feeds': feeds,
|
||||
|
@ -604,7 +604,7 @@ def feed_unread_count(request):
|
|||
else:
|
||||
feed_title = "%s feeds" % (len(feeds) + len(social_feeds))
|
||||
logging.user(request, "~FBUpdating unread count on: %s" % feed_title)
|
||||
# MAnalyticsLoader.add(page_load=time.time()-start)
|
||||
MAnalyticsLoader.add(page_load=time.time()-start)
|
||||
|
||||
return {'feeds': feeds, 'social_feeds': social_feeds}
|
||||
|
||||
|
@ -618,7 +618,7 @@ def refresh_feed(request, feed_id):
|
|||
usersub.calculate_feed_scores(silent=False)
|
||||
|
||||
logging.user(request, "~FBRefreshing feed: %s" % feed)
|
||||
# MAnalyticsLoader.add(page_load=time.time()-start)
|
||||
MAnalyticsLoader.add(page_load=time.time()-start)
|
||||
|
||||
return load_single_feed(request, feed_id)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue