正在显示
4 个修改的文件
包含
13 行增加
和
4 行删除
... | ... | @@ -24,7 +24,13 @@ class Api(ApiTemplate): |
24 | 24 | map_service_guid = uuid.uuid1().__str__() |
25 | 25 | service_function_guid = uuid.uuid1().__str__() |
26 | 26 | |
27 | - #调用MapService服务发布接口 | |
27 | + | |
28 | + | |
29 | + # 逻辑是,先调用引擎接口,引擎说可以,才做持久化 | |
30 | + | |
31 | + | |
32 | + | |
33 | + | |
28 | 34 | |
29 | 35 | service = Service( |
30 | 36 | guid = service_guid, |
... | ... | @@ -71,6 +77,7 @@ class Api(ApiTemplate): |
71 | 77 | # 调用MapService服务的注册服务接口 |
72 | 78 | try: |
73 | 79 | pass |
80 | + #对,逻辑是,先调用引擎接口,引擎说可以,才做持久化 | |
74 | 81 | except Exception as e: |
75 | 82 | db.session.delete(service) |
76 | 83 | db.session.delete(map_service) | ... | ... |
... | ... | @@ -31,13 +31,13 @@ class TaskController: |
31 | 31 | #控制正在运行的任务数量 |
32 | 32 | running_count = sys_session.query(Task).filter(Task.state == 2).filter(Task.task_type == 1).count() |
33 | 33 | first_task = sys_session.query(Task).filter(Task.state == 0).filter(Task.task_type == 1).order_by(Task.create_time).first() |
34 | - if (running_count > configure.entry_data_thread) or (not first_task.guid.__eq__(task_guid)): | |
34 | + if (running_count >= configure.entry_data_thread) or (not first_task.guid.__eq__(task_guid)): | |
35 | 35 | StructurePrint().print("等待入库") |
36 | 36 | check = False |
37 | 37 | if task.task_type==2: |
38 | 38 | running_count = sys_session.query(Task).filter(Task.state == 2).filter(Task.task_type == 2).count() |
39 | 39 | first_task = sys_session.query(Task).filter(Task.state == 0).filter(Task.task_type == 2).order_by(Task.create_time).first() |
40 | - if (running_count > configure.entry_data_thread) or (not first_task.guid.__eq__(task_guid)): | |
40 | + if (running_count >= configure.entry_data_thread) or (not first_task.guid.__eq__(task_guid)): | |
41 | 41 | StructurePrint().print("等待精化") |
42 | 42 | check = False |
43 | 43 | if task.task_type==3: | ... | ... |
请
注册
或
登录
后发表评论