Commit 2964351c authored by 张彦钊's avatar 张彦钊

add print

parent aede0c97
......@@ -24,6 +24,10 @@ LOCAL_DIRCTORY = "/Users/mac/utils/"
# 线上日记队列域名
QUEUE_ONLINE_HOST = 'rm-m5e842126ng59jrv6.mysql.rds.aliyuncs.com'
import pymysql
db = pymysql.connect(host='rm-m5e842126ng59jrv6.mysql.rds.aliyuncs.com', port=3306, user='doris',passwd='o5gbA27hXHHm',
db='doris_prod')
# 本地日记队列域名
LOCAL_HOST = 'rdsmaqevmuzj6jy.mysql.rds.aliyuncs.com'
......
......@@ -38,6 +38,8 @@ def get_video_id(cache_video_id):
return cache_video_id
else:
video_id = df[0].values.tolist()
print("videoid")
print(video_id[:2])
return video_id
......@@ -218,7 +220,7 @@ def get_queue(device_id, city_id,queue_name):
print('db')
db = pymysql.connect(host=QUEUE_ONLINE_HOST, port=3306, user='doris',passwd='o5gbA27hXHHm',
db='doris_prod')
print(db)
print(10)
else:
db = pymysql.connect(host=LOCAL_HOST, port=3306, user='work',
passwd='workwork', db='doris_test')
......@@ -257,7 +259,6 @@ def pipe_line(queue_name, queue_arg, device_id,total_video_id):
def user_update(device_id, city_id, queue_name,data_set_cid,total_video_id):
print(0)
queue_list = get_queue(device_id, city_id, queue_name)
if queue_list:
queue_predict = list(set(queue_list) & set(data_set_cid))
......@@ -280,7 +281,7 @@ def user_update(device_id, city_id, queue_name,data_set_cid,total_video_id):
def multi_proecess_update(device_id, city_id, data_set_cid,total_video_id):
queue_name_list = ["native_queue","nearby_queue","nation_queue","megacity_queue"]
pool = Pool(4)
pool = Pool(1)
for queue_name in queue_name_list:
pool.apply_async(user_update, (device_id, city_id, queue_name,data_set_cid,total_video_id,))
pool.close()
......
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