mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Updating db monitor redis ports.
This commit is contained in:
parent
7a049c1e55
commit
16768216c1
1 changed files with 8 additions and 8 deletions
|
@ -156,10 +156,10 @@ def db_check_redis_user():
|
|||
if request.args.get('consul') == '1':
|
||||
return str(1)
|
||||
|
||||
port = request.args.get('port', 6381)
|
||||
port = request.args.get('port', settings.REDIS_USER_PORT)
|
||||
|
||||
try:
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul:{port}', db=0)
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul', port=port, db=0)
|
||||
except:
|
||||
abort(Response("Can't connect to db", 503))
|
||||
|
||||
|
@ -178,10 +178,10 @@ def db_check_redis_story():
|
|||
if request.args.get('consul') == '1':
|
||||
return str(1)
|
||||
|
||||
port = request.args.get('port', 6380)
|
||||
port = request.args.get('port', settings.REDIS_STORY_PORT)
|
||||
|
||||
try:
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul:{port}', db=1)
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul', port=port, db=1)
|
||||
except:
|
||||
abort(Response("Can't connect to db", 503))
|
||||
|
||||
|
@ -200,10 +200,10 @@ def db_check_redis_sessions():
|
|||
if request.args.get('consul') == '1':
|
||||
return str(1)
|
||||
|
||||
port = request.args.get('port', 5382)
|
||||
port = request.args.get('port', settings.REDIS_SESSION_PORT)
|
||||
|
||||
try:
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul:{port}', db=5)
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul', port=port, db=5)
|
||||
except:
|
||||
abort(Response("Can't connect to db", 503))
|
||||
|
||||
|
@ -222,10 +222,10 @@ def db_check_redis_pubsub():
|
|||
if request.args.get('consul') == '1':
|
||||
return str(1)
|
||||
|
||||
port = request.args.get('port', 6383)
|
||||
port = request.args.get('port', settings.REDIS_PUBSUB_PORT)
|
||||
|
||||
try:
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul:{port}', db=1)
|
||||
r = redis.Redis(f'{settings.SERVER_NAME}.node.nyc1.consul', port=port, db=1)
|
||||
except:
|
||||
abort(Response("Can't connect to db", 503))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue