Merge "Removing wait() when initializing notification listener"

This commit is contained in:
Jenkins 2015-11-15 08:22:13 +00:00 committed by Gerrit Code Review
commit ade1d89172
2 changed files with 39 additions and 8 deletions

View File

@ -25,6 +25,7 @@ eventlet.monkey_patch(
time=True)
import os
import time
# If ../mistral/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
@ -76,8 +77,16 @@ def launch_executor(transport):
executor_v2.register_membership()
server.start()
server.wait()
try:
server.start()
while True:
time.sleep(604800)
except (KeyboardInterrupt, SystemExit):
pass
finally:
print("Stopping executor service...")
server.stop()
server.wait()
def launch_engine(transport):
@ -107,8 +116,16 @@ def launch_engine(transport):
engine_v2.register_membership()
server.start()
server.wait()
try:
server.start()
while True:
time.sleep(604800)
except (KeyboardInterrupt, SystemExit):
pass
finally:
print("Stopping engine service...")
server.stop()
server.wait()
def launch_api(transport):

View File

@ -44,8 +44,15 @@ def launch_engine_server(transport, engine):
serializer=ctx.RpcContextSerializer(ctx.JsonPayloadSerializer())
)
server.start()
server.wait()
try:
server.start()
while True:
eventlet.sleep(604800)
except (KeyboardInterrupt, SystemExit):
LOG.info("Stopping engine service...")
finally:
server.stop()
server.wait()
def launch_executor_server(transport, executor):
@ -62,8 +69,15 @@ def launch_executor_server(transport, executor):
serializer=ctx.RpcContextSerializer(ctx.JsonPayloadSerializer())
)
server.start()
server.wait()
try:
server.start()
while True:
eventlet.sleep(604800)
except (KeyboardInterrupt, SystemExit):
LOG.info("Stopping executor service...")
finally:
server.stop()
server.wait()
class EngineTestCase(base.DbTestCase):