Tuned QUEUED_ANNOUNCES. Logging.
parent
47add6381d
commit
0536b972d7
|
|
@ -108,8 +108,8 @@ class Reticulum:
|
|||
discovery significantly increases throughput over fast links.
|
||||
"""
|
||||
|
||||
MAX_QUEUED_ANNOUNCES = 16384
|
||||
QUEUED_ANNOUNCE_LIFE = 60*60*24
|
||||
MAX_QUEUED_ANNOUNCES = 4096
|
||||
QUEUED_ANNOUNCE_LIFE = 60*60*3
|
||||
|
||||
ANNOUNCE_CAP = 2
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1563,20 +1563,19 @@ class Transport:
|
|||
timer = threading.Timer(wait_time, interface.process_announce_queue)
|
||||
timer.start()
|
||||
|
||||
if wait_time < 1: wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||
else: wait_time_str = str(round(wait_time*1,2))+"s"
|
||||
|
||||
ql_str = str(len(interface.announce_queue))
|
||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME) if RNS.sl(RNS.LOG_EXTREME) else None
|
||||
if RNS.sl(RNS.LOG_EXTREME):
|
||||
if wait_time < 1: wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||
else: wait_time_str = str(round(wait_time*1,2))+"s"
|
||||
ql_str = str(len(interface.announce_queue))
|
||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
||||
|
||||
else:
|
||||
wait_time = max(interface.announce_allowed_at - time.time(), 0)
|
||||
|
||||
if wait_time < 1: wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||
else: wait_time_str = str(round(wait_time*1,2))+"s"
|
||||
|
||||
ql_str = str(len(interface.announce_queue))
|
||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME) if RNS.sl(RNS.LOG_EXTREME) else None
|
||||
if RNS.sl(RNS.LOG_EXTREME):
|
||||
wait_time = max(interface.announce_allowed_at - time.time(), 0)
|
||||
if wait_time < 1: wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||
else: wait_time_str = str(round(wait_time*1,2))+"s"
|
||||
ql_str = str(len(interface.announce_queue))
|
||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
||||
|
||||
else: pass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue