浏览代码

fix threading

master
Jeong Geol Kim 4 年前
父节点
当前提交
12b7c316d1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      auto_extract.py

+ 1
- 1
auto_extract.py 查看文件

@@ -35,7 +35,7 @@ def main():
35 35
                     f.close()
36 36
                     cmd_list = ['docker run --rm --name extract_1 --gpus '"device=0"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_01.py ' + id + '/ >> /dev/null', 'docker run --rm --name extract_2 --gpus '"device=1"' -v /dev:/dev -v /home/mc365/sources:/sources -v /hdd:/hdd ellishuntingmoon/mailsys:0.4 python3 /sources/extract_02.py ' + id + '/ >> /dev/null']
37 37
                     for index in range(0, len(cmd_list)):
38
-                        thread_list.append(threading.Thread(target=cmd_run,args=cmd_list))
38
+                        thread_list.append(threading.Thread(target=cmd_run,args=cmd_list[index]))
39 39
                         thread_list[index].start()                    
40 40
                     f = open(file, 'at')
41 41
                     r_time = time.ctime(time.time())

正在加载...
取消
保存