flowtester_ctl: navratova hodnota 0
S ohledem na task #124 (closed) doslo ke zmene manazara obsluhujiciho mobilni pripojeni. Nyni s restartem modemu se uvolni i wwan0 rozhrani coz zpusobi ukonceni vsech aktivnich pripojeni, probihajici iperf konci s kodem 0 coz vedek uz k jeho opetovnemu nenastartovani, chtelo by to upravit. Tento kod funguje
local function stop_loop()
if not scenario then return end
local now = os.time()
local running = false
for i,t in ipairs(sorted) do
if t.end_at <= now and not t.finished then
test_finished(t)
end
if t.running then running = true end
end
if running then
running = false
local ps = ucon:call("service", "list", {name = "ftester-sm"})
if ps and ps["ftester-sm"] and ps["ftester-sm"]["instances"] then
running = true
for id, inst in pairs(ps["ftester-sm"]["instances"]) do
for i,t in ipairs(sorted) do
if t.id == id then
t.running = inst.running
if not inst.running then
logger.log('debug', 'Exit code of process ' .. id .. " was " .. tostring(inst.exit_code))
if not t.restart then
test_finished(t)
else
restart_test(t)
end
end
end
end
end
end
end