From 3e0cd93cc7049201d64b144738d1c672e58370c5 Mon Sep 17 00:00:00 2001 From: AvishaiW Date: Thu, 13 Sep 2018 17:28:32 +0300 Subject: [PATCH] BLD: handle server down for maintenance --- catalyst/utils/remote.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/catalyst/utils/remote.py b/catalyst/utils/remote.py index 60e3c187a..6e76cc7c7 100644 --- a/catalyst/utils/remote.py +++ b/catalyst/utils/remote.py @@ -44,6 +44,9 @@ def handle_response(response, mode): "to wrong arguments given to the server.\n" + response.content.decode('utf-8') + '\n' + EXCEPTION_LOG) + elif response.status_code == 202: + raise Exception("The server is under maintenance. " + "please try again in a few minutes") else: # if the run was successful if mode == BACKTEST: algo_id = response.json()['algo_id']