From e7a2a62e99c9c140664cfbfaa38402983fa9ff1a Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 12 Dec 2018 10:56:56 +0100 Subject: GUI: return command confirmation to browser to avoid HTTP 503 --- python/dpdce.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'python') diff --git a/python/dpdce.py b/python/dpdce.py index 1ceac46..379f3d0 100755 --- a/python/dpdce.py +++ b/python/dpdce.py @@ -211,13 +211,15 @@ try: if method == 'trigger_run': logging.info('YAML-RPC request : {}'.format(method)) command_queue.put('trigger_run') + cmd_socket.send_success_response(addr, msg_id, None) elif method == 'reset': logging.info('YAML-RPC request : {}'.format(method)) command_queue.put('reset') + cmd_socket.send_success_response(addr, msg_id, None) elif method == 'set_setting': logging.info('YAML-RPC request : {} -> {}'.format(method, params)) # params == {'setting': ..., 'value': ...} - pass + cmd_socket.send_success_response(addr, msg_id, None) elif method == 'get_settings': with lock: cmd_socket.send_success_response(addr, msg_id, settings) @@ -227,6 +229,7 @@ try: elif method == 'calibrate': logging.info('YAML-RPC request : {}'.format(method)) command_queue.put('calibrate') + cmd_socket.send_success_response(addr, msg_id, None) else: cmd_socket.send_error_response(addr, msg_id, "request not understood") finally: -- cgit v1.2.3