修改均价系统到redis集群模式
This commit is contained in:
@@ -9,6 +9,7 @@ import requests
|
||||
import json
|
||||
import pickle
|
||||
import redis
|
||||
from rediscluster import StrictRedisCluster
|
||||
from fangjia import mongoClients as mongoClients
|
||||
from fangjia import ElasticsearchClient as es
|
||||
from fangjia.cachedObjectWrapper import CachedObjectWrapper
|
||||
@@ -526,6 +527,20 @@ def rent_find_disanganf_price(query, fields=None):
|
||||
raise Exception("yang ben cha xun shi bai1")
|
||||
|
||||
|
||||
def get_default_redis_connection():
|
||||
redis_nodes = [
|
||||
{'host': '192.168.0.79', 'port': 6379},
|
||||
{'host': '192.168.0.79', 'port': 6380},
|
||||
{'host': '192.168.0.79', 'port': 6381},
|
||||
{'host': '192.168.0.81', 'port': 6382},
|
||||
{'host': '192.168.0.81', 'port': 6383},
|
||||
{'host': '192.168.0.81', 'port': 6384}
|
||||
]
|
||||
redis_connection = StrictRedisCluster(startup_nodes=redis_nodes)
|
||||
return redis_connection
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user