Procházet zdrojové kódy

fix threading

master
Jeong Geol Kim před 4 roky
rodič
revize
12b7c316d1
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1
    1
      auto_extract.py

+ 1
- 1
auto_extract.py Zobrazit soubor

@@ -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())

Načítá se…
Zrušit
Uložit