update
This commit is contained in:
@@ -25,8 +25,8 @@ const TIMEOUT_SECS = 30 # request timeout
|
||||
const ATTEMPTS_PER_CHECK = 1 # number of ping attempts per check
|
||||
const BACKOFF_BETWEEN_ATTEMPTS = 1 # seconds between ping attempts
|
||||
const FAILS_TO_REBOOT = 3 # consecutive failed checks required to trigger reboot
|
||||
const COOLDOWN_AFTER_REBOOT_SECS = 120 # do not reboot again within this many seconds
|
||||
const DRY_RUN = true # set false to actually reboot
|
||||
const COOLDOWN_AFTER_REBOOT_SECS = 300 # do not reboot again within this many seconds
|
||||
const DRY_RUN = false # set false to actually reboot
|
||||
const CHECK_INTERVAL_SECS = 60 # run a check every CHECK_INTERVAL_SECS seconds
|
||||
|
||||
const thisFolderPath = @__DIR__
|
||||
@@ -237,8 +237,12 @@ function perform_check!(st::State)
|
||||
success = false
|
||||
last_result = nothing
|
||||
for i in 1:ATTEMPTS_PER_CHECK
|
||||
# ok, result = check_router_once(ROUTER_IP)
|
||||
ok, result = values(JSON.parsefile("/home/ton/docker-programs/check_and_reboot/test_ping_result.json")) # for testing without actual ping
|
||||
|
||||
# # for testing without actual ping
|
||||
# ok, result = values(JSON.parsefile("/home/ton/docker-programs/check_and_reboot/test_ping_result.json"))
|
||||
|
||||
ok, result = check_router_once(ROUTER_IP)
|
||||
|
||||
if ok
|
||||
success = true
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user