mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
In case mongodb isn't connected on favicon server.
This commit is contained in:
parent
7fcc8a4c71
commit
7dcb16605e
3 changed files with 4 additions and 3 deletions
2
fabfile.py
vendored
2
fabfile.py
vendored
|
@ -1459,7 +1459,9 @@ def kill():
|
|||
else:
|
||||
run('./utils/kill_gunicorn.sh')
|
||||
|
||||
@parallel
|
||||
def deploy_node():
|
||||
pull()
|
||||
with virtualenv():
|
||||
run('sudo supervisorctl restart node_unread')
|
||||
run('sudo supervisorctl restart node_unread_ssl')
|
||||
|
|
|
@ -21,7 +21,7 @@ else
|
|||
url = "mongodb://#{MONGODB_SERVER}:#{MONGODB_PORT}/newsblur?replicaSet=nbset&readPreference=secondaryPreferred"
|
||||
|
||||
mongo.MongoClient.connect url, (err, db) =>
|
||||
console.log " ---> Connected to #{db.serverConfig?.s.host}:#{db.serverConfig?.s.port} / #{err}"
|
||||
console.log " ---> Connected to #{db?.serverConfig.s.host}:#{db?.serverConfig.s.port} / #{err}"
|
||||
@collection = db.collection "feed_icons"
|
||||
|
||||
app.get /\/rss_feeds\/icon\/(\d+)\/?/, (req, res) =>
|
||||
|
|
|
@ -33,8 +33,7 @@
|
|||
|
||||
mongo.MongoClient.connect(url, (function(_this) {
|
||||
return function(err, db) {
|
||||
var _ref, _ref1;
|
||||
console.log(" ---> Connected to " + ((_ref = db.serverConfig) != null ? _ref.s.host : void 0) + ":" + ((_ref1 = db.serverConfig) != null ? _ref1.s.port : void 0) + " / " + err);
|
||||
console.log(" ---> Connected to " + (db != null ? db.serverConfig.s.host : void 0) + ":" + (db != null ? db.serverConfig.s.port : void 0) + " / " + err);
|
||||
return _this.collection = db.collection("feed_icons");
|
||||
};
|
||||
})(this));
|
||||
|
|
Loading…
Add table
Reference in a new issue