添加新接口
This commit is contained in:
parent
2758156e0b
commit
56a801ee34
|
@ -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
|
||||
|
||||
|
|
|
@ -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'):
|
||||
|
|
Loading…
Reference in New Issue