This commit is contained in:
youwater committed 2023-10-10 12:01:41 +08:00
commit 02fc7e03ec
1 file changed
+7 -5
+7 -5
View File
@@ -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)}')
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任务队列
if makeloop:
os.system(f'python main_step2.py {pid}')
else:
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):
if pid == '0':