Merge "Removing wait() when initializing notification listener"
This commit is contained in:
commit
ade1d89172
@ -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,7 +77,15 @@ def launch_executor(transport):
|
||||
|
||||
executor_v2.register_membership()
|
||||
|
||||
try:
|
||||
server.start()
|
||||
while True:
|
||||
time.sleep(604800)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
pass
|
||||
finally:
|
||||
print("Stopping executor service...")
|
||||
server.stop()
|
||||
server.wait()
|
||||
|
||||
|
||||
@ -107,7 +116,15 @@ def launch_engine(transport):
|
||||
|
||||
engine_v2.register_membership()
|
||||
|
||||
try:
|
||||
server.start()
|
||||
while True:
|
||||
time.sleep(604800)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
pass
|
||||
finally:
|
||||
print("Stopping engine service...")
|
||||
server.stop()
|
||||
server.wait()
|
||||
|
||||
|
||||
|
@ -44,7 +44,14 @@ def launch_engine_server(transport, engine):
|
||||
serializer=ctx.RpcContextSerializer(ctx.JsonPayloadSerializer())
|
||||
)
|
||||
|
||||
try:
|
||||
server.start()
|
||||
while True:
|
||||
eventlet.sleep(604800)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
LOG.info("Stopping engine service...")
|
||||
finally:
|
||||
server.stop()
|
||||
server.wait()
|
||||
|
||||
|
||||
@ -62,7 +69,14 @@ def launch_executor_server(transport, executor):
|
||||
serializer=ctx.RpcContextSerializer(ctx.JsonPayloadSerializer())
|
||||
)
|
||||
|
||||
try:
|
||||
server.start()
|
||||
while True:
|
||||
eventlet.sleep(604800)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
LOG.info("Stopping executor service...")
|
||||
finally:
|
||||
server.stop()
|
||||
server.wait()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user