Commit ea76a747 authored by lixiaofang's avatar lixiaofang

Merge branch 'sentry' into test

parents 8809504d fdcf5e31
......@@ -104,7 +104,11 @@ def get_cookies(user_id):
try:
session_key = "majia_login_session"
data = redis_client.hget(session_key, user_id)
return data
logging.info("get data:%s" % data)
logging.info("get data:%s" % json.loads(data))
return json.loads(data)
except:
return None
......
......@@ -22,10 +22,7 @@ def get_data():
data = cursor.fetchall()
user_id = list(data)
if len(user_id):
print(user_id)
user_id_list.append(user_id[0])
else:
pass
pc.close()
return user_id_list
except:
......
......@@ -12,9 +12,7 @@ def index_first():
r1 = requests.get(login_url)
return r1.cookies.get_dict()
except:
logging.error("index_first:%s" % traceback.format_exc())
return None
......@@ -53,7 +51,7 @@ def get_session():
session_key = "majia_login_session"
dicts = get_cook()
for key, value in dicts.items():
redis_client.hset(session_key, key, value)
redis_client.hset(session_key, key,json.dumps(value))
except:
logging.error("index_first:%s" % traceback.format_exc())
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 to comment