Commit d1d1bd12 by 陈森彬

update redis config

parent bedeb54e
Showing with 4 additions and 3 deletions
......@@ -26,7 +26,8 @@ redirect_uri = 'https://bigdata.ichunt.com/digikey_auth.php'
# client_secret = 'CxRLozO8hZ2GvCJ1'
# 对接digikey的api的token不放在master而放在这台机器上
apidigikey_ip = "172.18.137.38"
# apidigikey_ip = "172.18.137.38"
apidigikey_ip = "127.0.0.1"
master_redis_ip = "127.0.0.1"
psd = 'icDb29mLy2s'
......@@ -43,7 +44,7 @@ class DGTokenCrawler(token_lib.BaseTokenCrawler):
self._pool = redis.ConnectionPool(host=apidigikey_ip, port=6379, db=0, password=psd)
self._redis = redis.Redis(connection_pool=self._pool)
self._pool2 = redis.ConnectionPool(host=master_redis_ip, port=6379, db=0, password=psd)
self._redis2 = redis.Redis(connection_pool=self._pool)
self._redis2 = redis.Redis(connection_pool=self._pool2)
self.refresh_token_url = "http://127.0.0.1:8721/refresh"
def get_params_list(self):
......@@ -115,5 +116,5 @@ class DGTokenCrawler(token_lib.BaseTokenCrawler):
access_token, refresh_token = self.collect_token()
self._redis.set(self.token_key, access_token)
self._redis2.set(self.token_key, access_token)
# self._redis2.set(self.token_key, access_token)
self._redis.set(self.refresh_token_key, refresh_token)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment