Browse Source

定时读取任务没有分布式的概念

master
dongchangxi 1 year ago
parent
commit
dffc47641e
  1. 18
      timer/get_task_to_db.py

18
timer/get_task_to_db.py

@ -59,15 +59,15 @@ def readTask(key):
print("走新的建模系统不是分布式插入-重建工单",key,pid,psid) print("走新的建模系统不是分布式插入-重建工单",key,pid,psid)
libs_db.add_task(taskData) libs_db.add_task(taskData)
else: else:
intPid = int(psid) # intPid = int(psid)
if intPid == 29 or intPid == 94 or intPid == 51: # if intPid == 29 or intPid == 94 or intPid == 51:
libs_db.add_task(taskData) # libs_db.add_task(taskData)
elif int(psid) <= 90 and int(psid) != 29 and int(psid) != 56 and int(psid) != 1: # elif int(psid) <= 90 and int(psid) != 29 and int(psid) != 56 and int(psid) != 1:
print("走分布式建模",key,pid,psid) # print("走分布式建模",key,pid,psid)
if int(psid) == 41 or int(psid) == 85: # if int(psid) == 41 or int(psid) == 85:
taskData["priority"] = 0 # taskData["priority"] = 0
libs_db.add_task_distributed(taskData) # libs_db.add_task_distributed(taskData)
else: # else:
print("非分布式建模",key,pid,psid) print("非分布式建模",key,pid,psid)
libs_db.add_task(taskData) libs_db.add_task(taskData)
#程序主入口 #程序主入口

Loading…
Cancel
Save