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