From cdbbb95cfcfcf43e4c789075ed5ce79ff6d2a387 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 6 Feb 2020 14:11:12 +1000 Subject: Better wait for command startup. --- apt-panopticon.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apt-panopticon.lua b/apt-panopticon.lua index 793a80f..a36b229 100755 --- a/apt-panopticon.lua +++ b/apt-panopticon.lua @@ -1144,7 +1144,12 @@ else end end -os.execute('sleep 1') -- Wait for things to start up before checking for them. + while not APT.checkFile('results/LOG_' .. APT.options.referenceSite.value .. '.html') do -- Wait for things to start up before checking for them. + D('Waiting for results/LOG_' .. APT.options.referenceSite.value .. '.html'); + os.execute("sleep 5") +-- TODO - count these, and abort if it takes too long. + -- Try something similar for the other "Wait for things to start up before checking for them.", maybe fold it into APT.exe. + end while 1 <= APT.checkExes("apt-panopticon.lua " .. sendArgs) do os.execute("sleep 5") end local APT_args = APT.args -- cgit v1.1