Commit 843a93fe authored by Ozzieisaacs's avatar Ozzieisaacs

Updater fix for slow servers

parent fa360726
......@@ -51,7 +51,7 @@ class Updater(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.status = 0
self.status = -1
self.updateIndex = None
def get_current_version_info(self):
......
......@@ -1192,16 +1192,20 @@ def get_updater_status():
}
status['text'] = text
# helper.updater_thread = helper.Updater()
updater_thread.status = 0
updater_thread.start()
status['status'] = updater_thread.get_update_status()
elif request.method == "GET":
try:
status['status'] = updater_thread.get_update_status()
if status['status'] == -1:
status['status'] = 7
except AttributeError:
# thread is not active, occours after restart on update
status['status'] = 7
except Exception:
status['status'] = 11
app.logger.error(status['status'])
return json.dumps(status)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment