Browse Source

solve sshQuit argument

alpha
Jeong Geol Kim 4 years ago
parent
commit
4c89c5fd6f
1 changed files with 8 additions and 7 deletions
  1. 8
    7
      main.py

+ 8
- 7
main.py View File

34
     data_root_dir = './data/'+cs+sd
34
     data_root_dir = './data/'+cs+sd
35
     stdin, stdout, stderr = ssh.exec_command('mkdir ' + data_root_dir)
35
     stdin, stdout, stderr = ssh.exec_command('mkdir ' + data_root_dir)
36
     #TODO: 여기에 도커 명령어 및 동시 녹화 코드 입력
36
     #TODO: 여기에 도커 명령어 및 동시 녹화 코드 입력
37
-    stdin, stdout, stderr = ssh.exec_command('docker run --rm --name mail_recorder --gpus 1 --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+cs+sd+':/data/'+cs+sd+' stereolabs/zed:3.5-gl-devel-cuda11.0-ubuntu18.04 python3 /sources/recorder.py')
38
-    
37
+    stdin, stdout, stderr = ssh.exec_command('docker run --rm --name mail_recorder --gpus 1 --privileged -v /dev:/dev -v /home/mc365/sources:/sources -v /home/mc365/data/'+cs+sd+':/data/'+cs+sd+' stereolabs/zed:3.5-gl-devel-cuda11.1-ubuntu18.04 python3 /sources/recorder.py')
39
     print(stdout.readlines())
38
     print(stdout.readlines())
40
 
39
 
41
 def sshQuit(cs, sd):
40
 def sshQuit(cs, sd):
84
                 label_recording = tkinter.Label(window, text='MAIL system에 수술을 기록 중입니다.\n기록 중단을 원할 시 \n기록 종료 버튼을 눌러주세요.')
83
                 label_recording = tkinter.Label(window, text='MAIL system에 수술을 기록 중입니다.\n기록 중단을 원할 시 \n기록 종료 버튼을 눌러주세요.')
85
                 label_recording.pack()
84
                 label_recording.pack()
86
         
85
         
87
-def askQuit(customer):
86
+def askQuit(cn, sd):
87
+    customer_number = cn
88
+    surgery_date = sd
88
     msg_box = messagebox.askquestion("기록 중지 확인", '기록을 중지하시겠습니까?')
89
     msg_box = messagebox.askquestion("기록 중지 확인", '기록을 중지하시겠습니까?')
89
     if msg_box == 'yes':
90
     if msg_box == 'yes':
90
         #TODO: docker 중지 명령어 보내기
91
         #TODO: docker 중지 명령어 보내기
91
-        sshQuit()
92
+        sshQuit(customer_number, surgery_date)
92
         window.destroy()
93
         window.destroy()
93
 
94
 
94
 
95
 
95
 
96
 
96
 def buttonAction(event):    
97
 def buttonAction(event):    
97
-    if button_confirm['text'] == '입력완료':
98
-        customer_code = str(entry_customer_code.get())        
98
+    customer_code = str(entry_customer_code.get())        
99
+    if button_confirm['text'] == '입력완료':        
99
         askInformation(customer_code, surgery_date)
100
         askInformation(customer_code, surgery_date)
100
     else:
101
     else:
101
-        askQuit(customer_code, surgery_date)
102
+        askQuit(customer_code,surgery_date)
102
 # def fillSurgeryDate():
103
 # def fillSurgeryDate():
103
 
104
 
104
 
105
 

Loading…
Cancel
Save