diff --git a/higgins/api/app.py b/higgins/api/app.py index bb9152cc7..f5834af3a 100644 --- a/higgins/api/app.py +++ b/higgins/api/app.py @@ -35,6 +35,9 @@ API_SERVICE_OPTS = [ "the service, this option should be False; note, you " "will want to change public API endpoint to represent " "SSL termination URL with 'public_endpoint' option.")), + cfg.IntOpt('workers', + help=_("Number of workers for higgins-api service. " + "The default will be the number of CPUs available.")), ] CONF = cfg.CONF diff --git a/higgins/common/service.py b/higgins/common/service.py index eeab470a2..e34304e8e 100644 --- a/higgins/common/service.py +++ b/higgins/common/service.py @@ -70,7 +70,7 @@ class WSGIService(service.ServiceBase): """ self.name = name self.app = app.setup_app() - self.workers = (processutils.get_worker_count()) + self.workers = (CONF.api.workers or processutils.get_worker_count()) if self.workers and self.workers < 1: raise exception.ConfigInvalid( _("api_workers value of %d is invalid, "