mirror of
https://github.com/newnius/YAO-agent.git
synced 2025-12-15 22:06:43 +00:00
make sure task is launched
This commit is contained in:
7
agent.py
7
agent.py
@@ -46,7 +46,12 @@ def launch_tasks(stats):
|
|||||||
"pkill",
|
"pkill",
|
||||||
"sleep"
|
"sleep"
|
||||||
])
|
])
|
||||||
container.exec_run('sh -c \'' + script + '\'')
|
|
||||||
|
while True:
|
||||||
|
code = container.exec_run('sh -c \'' + script + '\'').exit_code
|
||||||
|
if code == 0:
|
||||||
|
break
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
for k in entries_to_remove:
|
for k in entries_to_remove:
|
||||||
pending_tasks.pop(k, None)
|
pending_tasks.pop(k, None)
|
||||||
|
|||||||
Reference in New Issue
Block a user