mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Adding more hints.
This commit is contained in:
parent
1be440c407
commit
20f083717e
4 changed files with 4 additions and 4 deletions
|
@ -641,7 +641,7 @@ def load_single_feed(request, feed_id):
|
|||
starred_stories = MStarredStory.objects(user_id=user.pk,
|
||||
story_feed_id=feed.pk,
|
||||
story_hash__in=story_hashes)\
|
||||
.hint([('user_id', 1), ('story_feed_id', 1)])\
|
||||
.hint([('user_id', 1), ('story_hash', 1)])\
|
||||
.only('story_hash', 'starred_date', 'user_tags')
|
||||
shared_story_hashes = MSharedStory.check_shared_story_hashes(user.pk, story_hashes)
|
||||
shared_stories = []
|
||||
|
@ -1164,6 +1164,7 @@ def load_read_stories(request):
|
|||
for story in shared_stories])
|
||||
starred_stories = MStarredStory.objects(user_id=user.pk,
|
||||
story_hash__in=story_hashes)\
|
||||
.hint([('user_id', 1), ('story_hash', 1)])\
|
||||
.only('story_hash', 'starred_date')
|
||||
starred_stories = dict([(story.story_hash, story.starred_date)
|
||||
for story in starred_stories])
|
||||
|
|
|
@ -1403,7 +1403,7 @@ class MCommentReply(mongo.EmbeddedDocument):
|
|||
}
|
||||
|
||||
|
||||
class MSharedStory(mongo.Document):
|
||||
class MSharedStory(mongo.DynamicDocument):
|
||||
user_id = mongo.IntField()
|
||||
shared_date = mongo.DateTimeField()
|
||||
comments = mongo.StringField()
|
||||
|
|
1
fabfile.py
vendored
1
fabfile.py
vendored
|
@ -1001,7 +1001,6 @@ def setup_mongo():
|
|||
sudo('mv mongodb.defaults /etc/default/mongod')
|
||||
sudo('mkdir -p /var/log/mongod')
|
||||
sudo('chown mongodb /var/log/mongod')
|
||||
sudo('/etc/init.d/mongod restart')
|
||||
put('config/logrotate.mongo.conf', '/etc/logrotate.d/mongod', use_sudo=True)
|
||||
|
||||
sudo('pip install pymongo==3.0.3') # For munin
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<img src="/media/img/logo_512.png" class="logo">
|
||||
<h1>NewsBlur is in <span class="error404">maintenance mode</span></h1>
|
||||
<div class="description">
|
||||
<p>Upgrading to a later version of Mongo, which will further improve loadtimes. This should take between 5 and 10 minutes.</p>
|
||||
<p>Upgrading to a later version of Mongo, which will further improve loadtimes. This should take about 5 minutes.</p>
|
||||
<p>To pass the time, <a href="http://mlkshk.com/popular">check out what's popular on MLKSHK</a>.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue