Commit b6c924d1 by Solo Group

add time pput

1 parent 37db008c
...@@ -88,9 +88,11 @@ class Doc(Transaction): ...@@ -88,9 +88,11 @@ class Doc(Transaction):
headers = get_header(userid, password) headers = get_header(userid, password)
params = dict(data=message) params = dict(data=message)
data = get_jsonrpc(method, params) data = get_jsonrpc(method, params)
self.log_info(url) timeout = 'timeout' in self.mod_conf and int(self.mod_conf['timeout']) or 5
self.log_info("URL:{} timeout:{} detik".format(url, timeout))
self.log_info("REQUEST {}".format(data)) self.log_info("REQUEST {}".format(data))
results = requests.post(url, json=data, headers=headers) # data=jsondata, results = requests.post(url, json=data, headers=headers, timeout=timeout) # data=jsondata,
if results.status_code != 200: if results.status_code != 200:
self.log_error(results) self.log_error(results)
self.log_error(results.text) self.log_error(results.text)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!