Merge "Set the Neutron server workers name"
This commit is contained in:
commit
a0fb188598
neutron
@ -18,8 +18,12 @@ from neutron.common import config
|
||||
|
||||
|
||||
class MaintenanceWorker(worker.BaseWorker):
|
||||
desc = 'maintenance worker'
|
||||
|
||||
def start(self):
|
||||
def __init__(self, **kwargs):
|
||||
super().__init__(desc=self.desc, **kwargs)
|
||||
|
||||
def start(self, **kwargs):
|
||||
super(MaintenanceWorker, self).start()
|
||||
# NOTE(twilson) The super class will trigger the post_fork_initialize
|
||||
# in the driver, which starts the connection/IDL notify loop which
|
||||
|
@ -100,7 +100,8 @@ class RpcWorker(neutron_worker.NeutronBaseWorker):
|
||||
|
||||
def __init__(self, plugins, worker_process_count=1):
|
||||
super(RpcWorker, self).__init__(
|
||||
worker_process_count=worker_process_count
|
||||
worker_process_count=worker_process_count,
|
||||
desc=self.desc,
|
||||
)
|
||||
|
||||
self._plugins = plugins
|
||||
|
@ -17,11 +17,13 @@ from oslo_service import loopingcall
|
||||
|
||||
class NeutronBaseWorker(worker.BaseWorker):
|
||||
|
||||
def __init__(self, worker_process_count=1, set_proctitle=None):
|
||||
def __init__(self, worker_process_count=1, set_proctitle=None,
|
||||
desc=None):
|
||||
set_proctitle = set_proctitle or cfg.CONF.setproctitle
|
||||
super(NeutronBaseWorker, self).__init__(
|
||||
worker_process_count=worker_process_count,
|
||||
set_proctitle=set_proctitle
|
||||
set_proctitle=set_proctitle,
|
||||
desc=desc,
|
||||
)
|
||||
|
||||
def start(self, name="neutron-server", desc=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user