mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Turning of MapReduce on popular tags for now. Waiting until Mongodb 1.8 to get MR on item_frequencies, so I can finally shard the database.
This commit is contained in:
parent
72a32f1976
commit
57bb59bc4c
2 changed files with 3 additions and 3 deletions
|
@ -422,9 +422,9 @@ class Feed(models.Model):
|
|||
|
||||
def save_popular_tags(self, feed_tags=None, verbose=False):
|
||||
if not feed_tags:
|
||||
all_tags = MStory.objects(story_feed_id=self.pk, story_tags__exists=True).item_frequencies_mr('story_tags')
|
||||
all_tags = MStory.objects(story_feed_id=self.pk, story_tags__exists=True).item_frequencies('story_tags')
|
||||
|
||||
feed_tags = sorted([(k, v) for k, v in all_tags.items() if isinstance(v, int) and int(v) > 1],
|
||||
feed_tags = sorted([(k, v) for k, v in all_tags.items() if isinstance(v, float) and int(v) > 1],
|
||||
key=itemgetter(1),
|
||||
reverse=True)[:25]
|
||||
popular_tags = json.encode(feed_tags)
|
||||
|
|
2
fabfile.py
vendored
2
fabfile.py
vendored
|
@ -50,7 +50,7 @@ def deploy_full():
|
|||
with cd('~/newsblur'):
|
||||
run('git pull')
|
||||
run('./manage.py migrate')
|
||||
run('kill -HUP `cat /var/run/gunicorn/gunicorn.pid`')
|
||||
run('sudo supervisorctl restart gunicorn')
|
||||
|
||||
@roles('app')
|
||||
def staging():
|
||||
|
|
Loading…
Add table
Reference in a new issue