Re-added delay to eww network script for tycho
This commit is contained in:
parent
c2f6e81215
commit
9aa542a32f
@ -225,13 +225,13 @@ while True:
|
||||
hop = get_first_hop()
|
||||
gw = get_gateways()
|
||||
default_route = get_default_route()
|
||||
# public IP shouldn't change often, so only check every 30 minutes or
|
||||
# public IP shouldn't change often, so only check every 2 hours or
|
||||
# if the default route or first hop changes
|
||||
if (
|
||||
default_route != last_default_route
|
||||
or last_ip_data is None
|
||||
or last_request is None
|
||||
or now() - last_request > 1800
|
||||
or now() - last_request > (2 * 60 * 60)
|
||||
or (hop != last_first_hop and hop is not None)
|
||||
):
|
||||
print("refreshing public IP", file=sys.stderr, flush=True)
|
||||
@ -277,3 +277,5 @@ while True:
|
||||
),
|
||||
flush=True,
|
||||
)
|
||||
|
||||
sleep(5)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user