Commit c4a9d8fd authored by 张彦钊's avatar 张彦钊

update dairyQueueUpdate file

parent 12360019
......@@ -225,29 +225,23 @@ def pipe_line(queue_name, queue_arg, device_id):
return diary_queue
def wrapper_func(queue_list,queue_name,device_id,city_id,data_set_cid,megacity_queue_list):
if queue_list:
queue_predict = list(set(queue_list) & set(data_set_cid))
queue_not_predict = list(set(queue_list) - set(data_set_cid))
queue_arg = [queue_predict, queue_not_predict, queue_list]
if queue_predict != []:
diary_queue = pipe_line(queue_name, queue_arg, device_id)
if diary_queue and (megacity_queue_list == get_megacity_queue(device_id, city_id)):
update_sql_dairy_queue(queue_name, diary_queue, device_id, city_id)
print("更新结束")
else:
print("日记队列已更新不需要更新日记队列,或者日记队列为空")
else:
print("预测集是空,不需要预测")
def user_update(device_id,city_id,data_set_cid):
queue_name_list = ["native_queue","nearby_queue","nation_queue","megacity_queue"]
for queue_name in queue_name_list:
queue_list = get_queue(device_id, city_id,queue_name)
if queue_name == "megacity_queue":
megacity_queue_list = queue_list
wrapper_func(queue_list,queue_name,device_id,city_id,data_set_cid,megacity_queue_list)
if queue_list:
queue_predict = list(set(queue_list) & set(data_set_cid))
queue_not_predict = list(set(queue_list) - set(data_set_cid))
queue_arg = [queue_predict, queue_not_predict, queue_list]
if queue_predict != []:
diary_queue = pipe_line(queue_name, queue_arg, device_id)
if diary_queue:
update_sql_dairy_queue(queue_name, diary_queue, device_id, city_id)
print("更新结束")
else:
print("获取的日记列表是空,所以不更新日记队列")
else:
print("预测集是空,不需要预测")
else:
print("日记队列为空")
......
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