Allow a file named openbench.exit to signal quiting
This commit is contained in:
1 parent
44d0c3cb12
commit
a28c61c0d0
1 file changed
+9
@@ -861,9 +861,18 @@ if __name__ == '__main__':
|
||||
|
||||
while True:
|
||||
try:
|
||||
# Request a new workload
|
||||
cleanup_client()
|
||||
response = server_request_workload(arguments)
|
||||
workload = check_workload_response(arguments, response)
|
||||
|
||||
# Fleet workers exit when there are no workloads
|
||||
if workload: complete_workload(arguments, workload)
|
||||
elif FLEET_MODE: break
|
||||
|
||||
# Check for exit signal via openbench.exit
|
||||
if os.path.isfile('openbench.exit'):
|
||||
print('Exited via openbench.exit')
|
||||
break
|
||||
|
||||
except Exception: traceback.print_exc()
|
||||
Reference in new issue
Block a user