summaryrefslogtreecommitdiff
path: root/magnum/cmd/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'magnum/cmd/api.py')
-rw-r--r--magnum/cmd/api.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/magnum/cmd/api.py b/magnum/cmd/api.py
index 394f67a..eaad02f 100644
--- a/magnum/cmd/api.py
+++ b/magnum/cmd/api.py
@@ -17,6 +17,7 @@
17import os 17import os
18import sys 18import sys
19 19
20from oslo_concurrency import processutils
20from oslo_log import log as logging 21from oslo_log import log as logging
21from oslo_reports import guru_meditation_report as gmr 22from oslo_reports import guru_meditation_report as gmr
22from werkzeug import serving 23from werkzeug import serving
@@ -79,5 +80,10 @@ def main():
79 LOG.info(_LI('Serving on %(proto)s://%(host)s:%(port)s'), 80 LOG.info(_LI('Serving on %(proto)s://%(host)s:%(port)s'),
80 dict(proto="https" if use_ssl else "http", host=host, port=port)) 81 dict(proto="https" if use_ssl else "http", host=host, port=port))
81 82
82 serving.run_simple(host, port, app, 83 workers = CONF.api.workers
84 if not workers:
85 workers = processutils.get_worker_count()
86 LOG.info(_LI('Server will handle each request in a new process up to'
87 ' %s concurrent processes'), workers)
88 serving.run_simple(host, port, app, processes=workers,
83 ssl_context=_get_ssl_configs(use_ssl)) 89 ssl_context=_get_ssl_configs(use_ssl))