Add some hooks for managers when service starts
Adds pre_start_hook() and post_start_hook() and fixes a couple of hard coded binary name checks in service.py Change-Id: I062790a88ed7f15a6f28961d6ddc1f230e19e0cb
This commit is contained in:
@@ -183,10 +183,30 @@ class Manager(base.Base):
|
||||
locals())
|
||||
|
||||
def init_host(self):
|
||||
"""Handle initialization if this is a standalone service.
|
||||
"""Hook to do additional manager initialization when one requests
|
||||
the service be started. This is called before any service record
|
||||
is created.
|
||||
|
||||
Child classes should override this method.
|
||||
"""
|
||||
pass
|
||||
|
||||
def pre_start_hook(self):
|
||||
"""Hook to provide the manager the ability to do additional
|
||||
start-up work before any RPC queues/consumers are created. This is
|
||||
called after other initialization has succeeded and a service
|
||||
record is created.
|
||||
|
||||
Child classes should override this method.
|
||||
"""
|
||||
pass
|
||||
|
||||
def post_start_hook(self):
|
||||
"""Hook to provide the manager the ability to do additional
|
||||
start-up work immediately after a service creates RPC consumers
|
||||
and starts 'running'.
|
||||
|
||||
Child classes should override this method.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
Reference in New Issue
Block a user