Keep orchestrator alive without stdin
This commit is contained in:
parent
49f4ace58b
commit
1f01b1b655
|
|
@ -1,5 +1,6 @@
|
||||||
import json
|
import json
|
||||||
import threading
|
import threading
|
||||||
|
import time
|
||||||
|
|
||||||
from redis_client import get_redis_client
|
from redis_client import get_redis_client
|
||||||
from result_listener import listen_for_results
|
from result_listener import listen_for_results
|
||||||
|
|
@ -34,13 +35,17 @@ def main():
|
||||||
)
|
)
|
||||||
listener.start()
|
listener.start()
|
||||||
|
|
||||||
print("orchestrator ready")
|
print("[orchestrator] ready")
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
command = input("> ").strip()
|
command = input("> ").strip()
|
||||||
except (EOFError, KeyboardInterrupt):
|
except EOFError:
|
||||||
|
print("[orchestrator] stdin closed, waiting...")
|
||||||
|
time.sleep(2)
|
||||||
|
continue
|
||||||
|
except KeyboardInterrupt:
|
||||||
print()
|
print()
|
||||||
break
|
continue
|
||||||
|
|
||||||
if not command:
|
if not command:
|
||||||
continue
|
continue
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue