Merge "Check for worker_service initialization"

changes/23/294023/17
Jenkins 2016-05-02 02:41:45 +00:00 committed by Gerrit Code Review
commit 2f9b344c67
2 changed files with 3 additions and 1 deletions

View File

@ -420,7 +420,7 @@ class EngineService(service.Service):
def stop(self):
self._stop_rpc_server()
if cfg.CONF.convergence_engine:
if cfg.CONF.convergence_engine and self.worker_service:
# Stop the WorkerService
self.worker_service.stop()

View File

@ -80,6 +80,8 @@ class WorkerService(service.Service):
super(WorkerService, self).start()
def stop(self):
if self._rpc_server is None:
return
# Stop rpc connection at first for preventing new requests
LOG.info(_LI("Stopping %(topic)s in engine %(engine)s."),
{'topic': self.topic, 'engine': self.engine_id})