程序优化
This commit is contained in:
1 parent
2093ff5526
commit
10640a63c2
8 files changed
+260
-44
No files matched your search
+18
-9
@@ -37,15 +37,23 @@ def readTask(key):
|
||||
|
||||
#默认走原来的数据表tasks,现在要切入一些数据过来走分布式建模系统
|
||||
taskData = {"task_type":key,"task_key":pid,"psid":psid,"priority":1}
|
||||
if int(psid) == 41 or int(psid) == 85:
|
||||
taskData["priority"] = 0
|
||||
|
||||
if libs_db.isStudioConfigDistribute(psid):
|
||||
print("走分布式建模系统插入",key,pid,psid)
|
||||
libs_db.add_task_distributed(taskData)
|
||||
else:
|
||||
print("走新的建模系统不是分布式插入",key,pid,psid)
|
||||
|
||||
if key == "rebuild":
|
||||
taskData["priority"] = 100
|
||||
print("走新的建模系统不是分布式插入-重建工单",key,pid,psid)
|
||||
libs_db.add_task(taskData)
|
||||
else:
|
||||
|
||||
if int(psid) == 41 or int(psid) == 85:
|
||||
taskData["priority"] = 0
|
||||
print("走分布式建模系统插入",key,pid,psid)
|
||||
libs_db.add_task_distributed(taskData)
|
||||
if libs_db.isStudioConfigDistribute(psid):
|
||||
print("走分布式建模系统插入",key,pid,psid)
|
||||
libs_db.add_task_distributed(taskData)
|
||||
else:
|
||||
print("走新的建模系统不是分布式插入",key,pid,psid)
|
||||
libs_db.add_task(taskData)
|
||||
|
||||
#程序主入口
|
||||
if __name__ == '__main__':
|
||||
@@ -59,4 +67,5 @@ if __name__ == '__main__':
|
||||
readTask('make10')
|
||||
time.sleep(10)
|
||||
readTask('make')
|
||||
time.sleep(10)
|
||||
time.sleep(10)
|
||||
readTask("rebuild")
|
||||
Reference in new issue
Block a user