Merge branch 'master' of https://git.suwa3d.com/natuka/modelmaking.api.suwa3d.com
This commit is contained in:
commit
02fc7e03ec
1 file changed
+6
-4
+6
-4
@@ -161,16 +161,18 @@ def step1(pid, experience=False, makeloop=True):
|
|||||||
|
|
||||||
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} step1图片预处理完成,共费时{libs.diff_time(start_time)}')
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} step1图片预处理完成,共费时{libs.diff_time(start_time)}')
|
||||||
|
|
||||||
|
if os.path.exists(os.path.join(config.sharedir, pid)):
|
||||||
|
shutil.rmtree(os.path.join(config.sharedir, pid), ignore_errors=True)
|
||||||
|
shutil.copytree(os.path.join(config.workdir, pid), os.path.join(config.sharedir, pid))
|
||||||
|
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} step1任务完成,移动到共享目录')
|
||||||
|
|
||||||
# TODO: 更新本地step1任务状态,加入step2任务队列
|
# TODO: 更新本地step1任务状态,加入step2任务队列
|
||||||
if makeloop:
|
if makeloop:
|
||||||
os.system(f'python main_step2.py {pid}')
|
os.system(f'python main_step2.py {pid}')
|
||||||
else:
|
else:
|
||||||
os.system(f'python main_step2.py {pid}')
|
os.system(f'python main_step2.py {pid}')
|
||||||
# if os.path.exists(os.path.join(config.sharedir, pid)):
|
|
||||||
# shutil.rmtree(os.path.join(config.sharedir, pid), ignore_errors=True)
|
|
||||||
# shutil.move(os.path.join(config.workdir, pid), config.sharedir)
|
|
||||||
|
|
||||||
# print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {pid} step1任务完成,移动到共享目录')
|
|
||||||
|
|
||||||
def main(pid, experience=False, makeloop=True):
|
def main(pid, experience=False, makeloop=True):
|
||||||
if pid == '0':
|
if pid == '0':
|
||||||
|
|||||||
Reference in new issue
Block a user