Mercurial > repos > pieterlukasse > nist_wrapper
comparison nist_wrapper.py @ 17:82368bd06e1d
small improvements
author | pieter.lukasse@wur.nl |
---|---|
date | Fri, 23 Jan 2015 17:13:06 +0100 |
parents | c21e96bb68c8 |
children | dae90b9abf61 |
comparison
equal
deleted
inserted
replaced
16:c21e96bb68c8 | 17:82368bd06e1d |
---|---|
131 | 131 |
132 timeSleeping = 0 | 132 timeSleeping = 0 |
133 startUpTime = 30 | 133 startUpTime = 30 |
134 # monitor process by checking state file: | 134 # monitor process by checking state file: |
135 utils.log_message(log_file, "monitoring SRCREADY.TXT...") | 135 utils.log_message(log_file, "monitoring SRCREADY.TXT...") |
136 # TODO2: do the controller part | |
137 # TODO3: do the popover part | |
138 while True: | 136 while True: |
139 # check if SRCREADY.TXT is there already: | 137 # check if SRCREADY.TXT is there already: |
140 if os.path.exists(file_to_monitor): | 138 if os.path.exists(file_to_monitor): |
141 break | 139 break |
142 time.sleep(2) | 140 time.sleep(2) |
143 timeSleeping = timeSleeping+2 | 141 timeSleeping = timeSleeping+2 |
144 if timeSleeping > (startUpTime + job_size*2): | 142 if timeSleeping > (startUpTime + job_size*2): |
145 # abort with timeout: | 143 # abort with timeout: |
146 utils.log_message(log_file, "No results after " + timeSleeping + " seconds...") | 144 utils.log_message(log_file, "No results after " + str(timeSleeping) + " seconds...") |
147 raise Exception('Error: timeout waiting for NIST results.') | 145 raise Exception('Error: timeout waiting for NIST results.') |
148 | 146 |
147 utils.log_message(log_file, "done...") | |
149 # kill process: | 148 # kill process: |
150 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that | 149 #p.terminate() - not needed, nistm$ will terminate...nistms.exe is the one that |
151 #stays open...and orphan..killing it: | 150 #stays open...and orphan..killing it: |
152 | 151 |
153 if is_wine: | 152 if is_wine: |