Merge "No longer allow redundant calls to server start()"

This commit is contained in:
Zuul 2018-07-10 10:24:58 +00:00 committed by Gerrit Code Review
commit b97481ce19
1 changed files with 4 additions and 6 deletions

View File

@ -395,13 +395,11 @@ class MessageHandlingServer(service.ServiceBase, _OrderedTaskRunner):
choose to dispatch messages in a new thread, coroutine or simply the choose to dispatch messages in a new thread, coroutine or simply the
current thread. current thread.
""" """
# Warn that restarting will be deprecated
if self._started: if self._started:
LOG.warning(_LW('Restarting a MessageHandlingServer is inherently ' LOG.warning(_LW('The server has already been started. Ignoring'
'racy. It is deprecated, and will become a noop ' ' the redundant call to start().'))
'in a future release of oslo.messaging. If you ' return
'need to restart MessageHandlingServer you should '
'instantiate a new object.'))
self._started = True self._started = True
executor_opts = {} executor_opts = {}