Commit bb2816d2 authored by 赵威's avatar 赵威

add loger

parent bb34008d
......@@ -144,11 +144,9 @@ def get_user_tag_score(cl_id, size=10):
if __name__ == '__main__':
try:
print("!!!!!!!!!!!!!!!!!!!!!!!")
db_jerry_test = pymysql.connect(host='172.16.40.170', port=4000, user='st_user', passwd='aqpuBLYzEV7tML5RPsN1pntUzFy',
db='jerry_test', charset='utf8')
cur_jerry_test = db_jerry_test.cursor()
print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# 获取所有用户的设备id
# sql_device_ids = "select distinct cl_id from user_new_tag_log"
......@@ -157,7 +155,6 @@ if __name__ == '__main__':
"where time > UNIX_TIMESTAMP(DATE_SUB(NOW(), INTERVAL 30 day))"
cur_jerry_test.execute(sql_device_ids)
device_ids_lst = [i[0] for i in cur_jerry_test.fetchall()]
print("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBb")
# 获取所有用户的行为日志
# sql_all_log = "select time,cl_id,score_type,tag_id,tag_referrer,action from user_new_tag_log"
......
......@@ -117,9 +117,11 @@ def get_user_service_portrait(cl_id, all_word_tags, all_tag_tag_type, all_3tag_2
if __name__ == '__main__':
try:
print("!!!!!!!!!!!!!!!!!!!!!!!")
db_jerry_test = pymysql.connect(host='172.16.40.170', port=4000, user='st_user', passwd='aqpuBLYzEV7tML5RPsN1pntUzFy',
db='jerry_test', charset='utf8')
cur_jerry_test = db_jerry_test.cursor()
print("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
# 获取最近30天内的用户设备id
sql_device_ids = "select distinct cl_id from user_new_tag_log " \
......@@ -128,6 +130,8 @@ if __name__ == '__main__':
device_ids_lst = [i[0] for i in cur_jerry_test.fetchall()]
db_jerry_test.close()
cur_jerry_test.close()
print("BBBBBBBBBBBBBBBBBBBBBBBBBBBBBb")
redis_client = redis.StrictRedis.from_url('redis://:ReDis!GmTx*0aN9@172.16.40.173:6379')
# 获取搜索词及其近义词对应的tag
......
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