From 56a801ee3467cee3ef8ed62a71a2c84d83a76941 Mon Sep 17 00:00:00 2001 From: "tangshuangpku@hotmail.com" Date: Mon, 6 Jun 2016 23:07:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/monitor.py | 4 ++-- web/webViews/dockletrequest.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/monitor.py b/src/monitor.py index 3e5b275..a74b90b 100755 --- a/src/monitor.py +++ b/src/monitor.py @@ -16,7 +16,7 @@ class Container_Collector(threading.Thread): def __init__(self,test=False): threading.Thread.__init__(self) self.thread_stop = False - self.interval = 2 + self.interval = 2000 self.test = test self.cpu_last = {} self.cpu_quota = {} @@ -181,7 +181,7 @@ class Collector(threading.Thread): def __init__(self,test=False): threading.Thread.__init__(self) self.thread_stop = False - self.interval = 1 + self.interval = 1000 self.test=test return diff --git a/web/webViews/dockletrequest.py b/web/webViews/dockletrequest.py index 5e3a1a9..0833433 100644 --- a/web/webViews/dockletrequest.py +++ b/web/webViews/dockletrequest.py @@ -14,7 +14,9 @@ class dockletRequest(): data['token'] = session['token'] logger.info ("Docklet Request: user = %s data = %s, url = %s"%(session['username'], data, url)) - result = requests.post(endpoint + url, data = data).json() + response = requests.post(endpoint + url, data=data) + logger.info('response content: %s'%response.content) + result = response.json() if (result.get('success', None) == "false" and result.get('reason', None) == "Unauthorized Action"): abort(401) if (result.get('Unauthorized', None) == 'True'):