修改Redis指向
This commit is contained in:
@@ -8,7 +8,7 @@ import fangjia
|
|||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
QUEUE = "calc_cmd"
|
QUEUE = "calc_cmd"
|
||||||
redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=1)
|
redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=config.get_redis_db())
|
||||||
logger = fangjia.get_logger("CalcCmdReceiver")
|
logger = fangjia.get_logger("CalcCmdReceiver")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class CJsonEncoder(json.JSONEncoder):
|
|||||||
|
|
||||||
|
|
||||||
QUEUE = "calc_cmd"
|
QUEUE = "calc_cmd"
|
||||||
redisPool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=1)
|
redisPool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=config.get_redis_db())
|
||||||
client = redis.Redis(connection_pool=redisPool)
|
client = redis.Redis(connection_pool=redisPool)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import redis
|
|||||||
import config
|
import config
|
||||||
|
|
||||||
QUEUE = "calc_cmd"
|
QUEUE = "calc_cmd"
|
||||||
redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=0)
|
redis_pool = redis.ConnectionPool(host=config.get_redis_host(), port=6379, db=config.get_redis_db())
|
||||||
|
|
||||||
|
|
||||||
def monitor(pname):
|
def monitor(pname):
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ def get_redis_host():
|
|||||||
return "192.168.0.144"
|
return "192.168.0.144"
|
||||||
|
|
||||||
|
|
||||||
|
def get_redis_db():
|
||||||
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def get_mongodb_host():
|
def get_mongodb_host():
|
||||||
return "192.168.10.182"
|
return "192.168.10.182"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user