Browse Source

fix threading

master
Jeong Geol Kim 4 years ago
parent
commit
12b7c316d1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      auto_extract.py

+ 1
- 1
auto_extract.py View File

35
                     f.close()
35
                     f.close()
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']
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
                     for index in range(0, len(cmd_list)):
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
                         thread_list[index].start()                    
39
                         thread_list[index].start()                    
40
                     f = open(file, 'at')
40
                     f = open(file, 'at')
41
                     r_time = time.ctime(time.time())
41
                     r_time = time.ctime(time.time())

Loading…
Cancel
Save