Merge "Add a callback registry event for the init process - before spawning"
This commit is contained in:
commit
96d053a389
@ -31,7 +31,8 @@ AFTER_REQUEST = 'after_request'
|
||||
|
||||
# String literals representing events associated to process operations
|
||||
BEFORE_INIT = 'before_init'
|
||||
AFTER_INIT = 'after_init'
|
||||
BEFORE_SPAWN = 'before_spawn' # sent per process
|
||||
AFTER_INIT = 'after_init' # sent per worker
|
||||
|
||||
# String literals representing events associated to error conditions
|
||||
ABORT_CREATE = 'abort_create'
|
||||
|
@ -27,6 +27,9 @@ from oslo_utils import excutils
|
||||
from oslo_utils import importutils
|
||||
|
||||
from neutron._i18n import _LE, _LI
|
||||
from neutron.callbacks import events
|
||||
from neutron.callbacks import registry
|
||||
from neutron.callbacks import resources
|
||||
from neutron.common import config
|
||||
from neutron.common import profiler
|
||||
from neutron.common import rpc as n_rpc
|
||||
@ -87,6 +90,7 @@ def serve_wsgi(cls):
|
||||
LOG.exception(_LE('Unrecoverable error: please check log '
|
||||
'for details.'))
|
||||
|
||||
registry.notify(resources.PROCESS, events.BEFORE_SPAWN, service)
|
||||
return service
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user