mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Merge branch 'master' into saved
* master: Transitioning from tag to tag/feed_id. Max of 3 updates per fetch. Upgrading mongodb mms agent.
This commit is contained in:
commit
af6b60868a
3 changed files with 18 additions and 6 deletions
|
@ -997,7 +997,7 @@ class Feed(models.Model):
|
||||||
logging.info(' ---> [%-30s] ~SN~FRIntegrityError on new story: %s - %s' % (self.feed_title[:30], story.get('guid'), e))
|
logging.info(' ---> [%-30s] ~SN~FRIntegrityError on new story: %s - %s' % (self.feed_title[:30], story.get('guid'), e))
|
||||||
if self.search_indexed:
|
if self.search_indexed:
|
||||||
s.index_story_for_search()
|
s.index_story_for_search()
|
||||||
elif existing_story and story_has_changed and not updates_off:
|
elif existing_story and story_has_changed and not updates_off and ret_values['updated'] < 3:
|
||||||
# update story
|
# update story
|
||||||
original_content = None
|
original_content = None
|
||||||
try:
|
try:
|
||||||
|
|
17
fabfile.py
vendored
17
fabfile.py
vendored
|
@ -252,6 +252,7 @@ def setup_db(engine=None, skip_common=False):
|
||||||
setup_postgres(standby=True)
|
setup_postgres(standby=True)
|
||||||
elif engine.startswith("mongo"):
|
elif engine.startswith("mongo"):
|
||||||
setup_mongo()
|
setup_mongo()
|
||||||
|
setup_mongo_mms()
|
||||||
elif engine == "redis":
|
elif engine == "redis":
|
||||||
setup_redis()
|
setup_redis()
|
||||||
elif engine == "redis_slave":
|
elif engine == "redis_slave":
|
||||||
|
@ -883,13 +884,19 @@ def setup_mongo_mongos():
|
||||||
|
|
||||||
def setup_mongo_mms():
|
def setup_mongo_mms():
|
||||||
pull()
|
pull()
|
||||||
put(os.path.join(env.SECRETS_PATH, 'settings/mongo_mms_settings.py'),
|
sudo('rm -f /etc/supervisor/conf.d/mongomms.conf')
|
||||||
'%s/vendor/mms-agent/settings.py' % env.NEWSBLUR_PATH)
|
|
||||||
with cd(env.NEWSBLUR_PATH):
|
|
||||||
put('config/supervisor_mongomms.conf', '/etc/supervisor/conf.d/mongomms.conf', use_sudo=True)
|
|
||||||
sudo('supervisorctl reread')
|
sudo('supervisorctl reread')
|
||||||
sudo('supervisorctl update')
|
sudo('supervisorctl update')
|
||||||
|
with cd(env.VENDOR_PATH):
|
||||||
|
sudo('apt-get remove -y mongodb-mms-monitoring-agent')
|
||||||
|
run('curl -OL https://mms.mongodb.com/download/agent/monitoring/mongodb-mms-monitoring-agent_2.2.0.70-1_amd64.deb')
|
||||||
|
sudo('dpkg -i mongodb-mms-monitoring-agent_2.2.0.70-1_amd64.deb')
|
||||||
|
run('rm mongodb-mms-monitoring-agent_2.2.0.70-1_amd64.deb')
|
||||||
|
put(os.path.join(env.SECRETS_PATH, 'settings/mongo_mms_config.txt'),
|
||||||
|
'mongo_mms_config.txt')
|
||||||
|
sudo("echo \"\n\" >> /etc/mongodb-mms/monitoring-agent.config")
|
||||||
|
sudo('cat mongo_mms_config.txt >> /etc/mongodb-mms/monitoring-agent.config')
|
||||||
|
sudo('start mongodb-mms-monitoring-agent')
|
||||||
|
|
||||||
def setup_redis(slave=False):
|
def setup_redis(slave=False):
|
||||||
redis_version = '2.6.16'
|
redis_version = '2.6.16'
|
||||||
|
|
|
@ -41,6 +41,11 @@ NEWSBLUR.Collections.StarredFeeds = Backbone.Collection.extend({
|
||||||
// feed.selected = false;
|
// feed.selected = false;
|
||||||
feed.ps = feed.count;
|
feed.ps = feed.count;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Remove below, only used for transition to tag/feed_id.
|
||||||
|
models = _.filter(models, function(feed) {
|
||||||
|
return feed['tag'];
|
||||||
|
});
|
||||||
return models;
|
return models;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue