diff --git a/main_step1.py b/main_step1.py index d2b4033..ae060bd 100644 --- a/main_step1.py +++ b/main_step1.py @@ -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':