The life cycle of the testbox is from booting to rebooting. "deadline" is set during booting and reset during rebooting.
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/lib/sched.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/lib/sched.cr b/src/lib/sched.cr index 8d7c218..f46d97c 100644 --- a/src/lib/sched.cr +++ b/src/lib/sched.cr @@ -104,7 +104,7 @@ class Sched
def update_tbox_wtmp testbox = "" - hash = Hash(String, String).new + hash = Hash(String, String | Nil).new
time = Time.local.to_s("%Y-%m-%d %H:%M:%S") hash["time"] = time @@ -116,6 +116,7 @@ class Sched testbox = value when "tbox_state" hash["state"] = value + hash["deadline"] = nil if value == "rebooting" when "mac" hash["mac"] = normalize_mac(value) else