[NO TESTS] WIP

This commit is contained in:
Reid 'arrdem' McKenzie 2021-12-27 00:31:36 -07:00
parent c4f13f186a
commit d27bc0ab5b

View file

@ -144,7 +144,7 @@ def retrace(shutdown, q, opts, hl, hosts):
with hl: with hl:
if address not in hosts: if address not in hosts:
log.info(f"Monitoring {address}...") log.info(f"Monitoring {address}...")
monitor = MonitoredHost(address, timedelta(seconds=2)) monitor = MonitoredHost(address, timedelta(seconds=4))
hosts[address] = (distance, monitor) hosts[address] = (distance, monitor)
threads[address] = t = Thread(target=monitor, args=(shutdown, q)) threads[address] = t = Thread(target=monitor, args=(shutdown, q))
t.start() t.start()
@ -165,7 +165,7 @@ def retrace(shutdown, q, opts, hl, hosts):
def render(shutdown, q, stdscr, hl, hosts): def render(shutdown, q, stdscr, hl, hosts):
dt = timedelta(minutes=30) dt = timedelta(minutes=30)
with open("incidents.txt", "w") as fp: with open("incidents.txt", "a") as fp:
incident = False incident = False
while not shutdown.is_set(): while not shutdown.is_set():
rows, cols = stdscr.getmaxyx() rows, cols = stdscr.getmaxyx()