aboutsummaryrefslogtreecommitdiffstats
path: root/api/yardstick.ini
blob: d2e8956e2344aab4830f5b67865ca8ea4161021c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
[uwsgi]
master = true
debug = true
chdir = /home/opnfv/repos/yardstick/api
module = server
plugins = python
processes = 10
threads = 5
async = true
max-requests = 5000
chmod-socket = 666
callable = app_wrapper
enable-threads = true
close-on-exec = 1
daemonize= /var/log/yardstick/uwsgi.log
socket = /var/run/yardstick.sock
ass="n">data) headers = {'Content-Type': 'application/json'} try: response = requests.post(url, data=data, headers=headers) result = response.json() logger.debug('The result is: %s', result) return result except Exception as e: logger.exception('Failed: %s', e) raise def get(url): url = '{}{}'.format(consts.BASE_URL, url) response = requests.get(url) return response.json()