aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 10:56:56 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-12 10:56:56 +0100
commite7a2a62e99c9c140664cfbfaa38402983fa9ff1a (patch)
treeb005e1b6e932c4681289e11981acb14722e9ee15
parentf409d342c5a314f4aa35382bbdd8daa3882172d1 (diff)
downloaddabmod-e7a2a62e99c9c140664cfbfaa38402983fa9ff1a.tar.gz
dabmod-e7a2a62e99c9c140664cfbfaa38402983fa9ff1a.tar.bz2
dabmod-e7a2a62e99c9c140664cfbfaa38402983fa9ff1a.zip
GUI: return command confirmation to browser to avoid HTTP 503
-rwxr-xr-xpython/dpdce.py5
1 files changed, 4 insertions, 1 deletions
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: