正在显示
11 个修改的文件
包含
9 行增加
和
7 行删除
1 | -GBK | |
\ No newline at end of file |
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
不能预览此文件类型
... | ... | @@ -53,7 +53,7 @@ class Api(ApiTemplate): |
53 | 53 | download_process = multiprocessing.Process(target=self.download, args=(task_guid,self.para)) |
54 | 54 | download_process.start() |
55 | 55 | |
56 | - task.task_pid = download_process.pid | |
56 | + Task.query.filter_by(guid=task_guid).update({"task_pid": download_process.pid}) | |
57 | 57 | db.session.commit() |
58 | 58 | |
59 | 59 | res["data"] = "下载任务已提交!" | ... | ... |
... | ... | @@ -100,7 +100,8 @@ class Api(ApiTemplate): |
100 | 100 | |
101 | 101 | entry_thread = multiprocessing.Process(target=self.entry,args=(self.para.get("task_guid"),)) |
102 | 102 | entry_thread.start() |
103 | - task.task_pid=entry_thread.pid | |
103 | + | |
104 | + Task.query.filter_by(guid=task_guid).update({"task_pid": entry_thread.pid}) | |
104 | 105 | db.session.commit() |
105 | 106 | |
106 | 107 | res["result"] = True | ... | ... |
... | ... | @@ -52,7 +52,8 @@ class Api(ApiTemplate): |
52 | 52 | |
53 | 53 | refresh_process = multiprocessing.Process(target=self.table_refresh,args=(database,task_guid,self.para.get("creator"))) |
54 | 54 | refresh_process.start() |
55 | - task.task_pid = refresh_process.pid | |
55 | + | |
56 | + Task.query.filter_by(guid=task_guid).update({"task_pid":refresh_process.pid}) | |
56 | 57 | db.session.commit() |
57 | 58 | |
58 | 59 | res["msg"] = "数据库更新已提交!" | ... | ... |
... | ... | @@ -92,7 +92,7 @@ class Api(ApiTemplate): |
92 | 92 | vacuate_process = multiprocessing.Process(target=self.task,args=(table,task_guid)) |
93 | 93 | vacuate_process.start() |
94 | 94 | |
95 | - task.task_pid = vacuate_process.pid | |
95 | + Task.query.filter_by(guid=task_guid).update({"task_pid": vacuate_process.pid}) | |
96 | 96 | db.session.commit() |
97 | 97 | |
98 | 98 | res["msg"] = "矢量金字塔构建已提交!" | ... | ... |
... | ... | @@ -97,7 +97,8 @@ class Api(ApiTemplate): |
97 | 97 | |
98 | 98 | vacuate_process = multiprocessing.Process(target=self.task,args=(table,task_guid,grids)) |
99 | 99 | vacuate_process.start() |
100 | - task.task_pid = vacuate_process.pid | |
100 | + | |
101 | + Task.query.filter_by(guid=task_guid).update({"task_pid": vacuate_process.pid}) | |
101 | 102 | db.session.commit() |
102 | 103 | |
103 | 104 | res["msg"] = "矢量金字塔构建已提交!" | ... | ... |
请
注册
或
登录
后发表评论