Commit 7ad42665 authored by 张彦钊's avatar 张彦钊

add print

parent 17271082
......@@ -213,13 +213,14 @@ def queue_compare(old_list, new_list):
def get_queue(device_id, city_id,queue_name):
print(1)
if flag:
db = pymysql.connect(host=QUEUE_ONLINE_HOST, port=3306, user='doris',passwd='o5gbA27hXHHm',
db='doris_prod')
else:
db = pymysql.connect(host=LOCAL_HOST, port=3306, user='work',
passwd='workwork', db='doris_test')
print(1)
cursor = db.cursor()
sql = "select {} from device_diary_queue " \
"where device_id = '{}' and city_id = '{}';".format(queue_name,device_id, city_id)
......@@ -265,7 +266,7 @@ def user_update(device_id, city_id, queue_name,data_set_cid,total_video_id):
if diary_queue:
update_sql_dairy_queue(queue_name, diary_queue, device_id, city_id)
queue_compare(queue_list,diary_queue)
# print("更新结束")
print("更新结束")
else:
print("获取的日记列表是空,所以不更新日记队列")
else:
......@@ -277,7 +278,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(1)
pool = Pool(4)
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