From d0abc8eac08019e0d7efd2884a3765f7f47678a3 Mon Sep 17 00:00:00 2001 From: AvishaiW Date: Wed, 14 Mar 2018 09:40:45 +0200 Subject: [PATCH] DEV: minor change in order to get log tail from server (WIP) --- catalyst/utils/run_server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalyst/utils/run_server.py b/catalyst/utils/run_server.py index 7281a5af..43b782e7 100644 --- a/catalyst/utils/run_server.py +++ b/catalyst/utils/run_server.py @@ -49,6 +49,7 @@ def run_server( # address to send url = 'http://sandbox.enigma.co/api/catalyst/serve' + # url = 'http://127.0.0.1:5000/api/catalyst/serve' # argument preparation - encode the file for transfer if algotext: @@ -93,9 +94,10 @@ def run_server( default=convert_date ) ) + if response.status_code == 500: raise Exception("issues with cloud connections, " "unable to run catalyst on the cloud") recieved_data = response.json() - cloud_log_tail = base64.b64decode(recieved_data["logs"]) + cloud_log_tail = base64.b64decode(recieved_data["log"]) print(cloud_log_tail)