mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
More aggregation changes.
This commit is contained in:
parent
5dc079efc2
commit
56b3dfa659
4 changed files with 4 additions and 4 deletions
|
@ -2621,7 +2621,7 @@ class MStarredStory(mongo.DynamicDocument):
|
|||
},
|
||||
}])
|
||||
month_ago = datetime.datetime.now() - datetime.timedelta(days=days)
|
||||
user_ids = stats['result']
|
||||
user_ids = list(stats)
|
||||
user_ids = sorted(user_ids, key=lambda x:x['stories'], reverse=True)
|
||||
print " ---> Found %s users with more than %s starred stories" % (len(user_ids), stories)
|
||||
|
||||
|
|
|
@ -1533,7 +1533,7 @@ class MSharedStory(mongo.DynamicDocument):
|
|||
},
|
||||
}])
|
||||
month_ago = datetime.datetime.now() - datetime.timedelta(days=days)
|
||||
user_ids = stats['result']
|
||||
user_ids = list(stats)
|
||||
user_ids = sorted(user_ids, key=lambda x:x['stories'], reverse=True)
|
||||
print " ---> Found %s users with more than %s starred stories" % (len(user_ids), stories)
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ class NBMuninGraph(MuninGraph):
|
|||
},
|
||||
}])
|
||||
|
||||
return stats['result']
|
||||
return list(stats)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -43,7 +43,7 @@ class NBMuninGraph(MuninGraph):
|
|||
},
|
||||
}])
|
||||
|
||||
return stats['result'][0]
|
||||
return list(stats)[0]
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
Loading…
Add table
Reference in a new issue