diff options
author | drebs <drebs@riseup.net> | 2017-10-20 17:18:18 -0200 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-11-02 09:36:31 -0200 |
commit | e3879ac206e66437cefbe968e77f757239640681 (patch) | |
tree | e48bbde2774e58d2b74bc992d645f8e170dfe0a5 /scripts/scalability/test_controller/server/server.tac | |
parent | bba22c8439b56df4a74583f2582a89045ee43182 (diff) |
[benchmarks] add tokens setup to server scalability test controller
Diffstat (limited to 'scripts/scalability/test_controller/server/server.tac')
-rw-r--r-- | scripts/scalability/test_controller/server/server.tac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/scalability/test_controller/server/server.tac b/scripts/scalability/test_controller/server/server.tac index c525e3ed..3d5ea8cc 100644 --- a/scripts/scalability/test_controller/server/server.tac +++ b/scripts/scalability/test_controller/server/server.tac @@ -206,7 +206,8 @@ class MonitorResource(resource.Resource): class SetupResource(resource.Resource): def render_POST(self, request): - d = ensure_dbs() + create = request.args.get('create') or [1000] + d = ensure_dbs(create=int(create.pop())) d.addCallback(self._success, request) d.addErrback(self._error, request) return server.NOT_DONE_YET @@ -216,7 +217,8 @@ class SetupResource(resource.Resource): request.finish() def _error(self, e, request): - logger.error('Error processing request: %s' % e.getErrorMessage()) + message = e.getErrorMessage() if e.getErrorMessage() else repr(e) + logger.error('Error processing request: %s' % message) request.setResponseCode(500) request.write(json.dumps({'error': str(e)})) request.finish() |