From 9c882f7c83378d77963982b6b9e942a40ccb1aa5 Mon Sep 17 00:00:00 2001 From: Ashish D'Souza Date: Mon, 3 Jul 2023 11:50:06 +1000 Subject: [PATCH] Added delay after performing reboot operation --- rebooter/src/rebooter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rebooter/src/rebooter.py b/rebooter/src/rebooter.py index b1dc666..f685a3c 100644 --- a/rebooter/src/rebooter.py +++ b/rebooter/src/rebooter.py @@ -59,8 +59,9 @@ if __name__ == '__main__': with open('/logs/connectivity.log', 'a') as log: log.write(f'{datetime.now()} - Internet down, rebooting router\n') - router.reboot() consecutive_downtime = 0 + router.reboot() + sleep(120) else: consecutive_internet_downtime += 1 with open('/logs/connectivity.log', 'a') as log: