some delay for latency measurment from start

This commit is contained in:
clore 2024-12-07 02:05:17 +00:00
parent c4a4b53897
commit fe954babc7
1 changed files with 5 additions and 3 deletions

View File

@ -146,6 +146,7 @@ class CloreClient:
self.clore_partner_initiazized = False
self.partner_forwarding_ips = []
self.start_time = utils.unix_timestamp()
async def service(self):
global container_log_broken
@ -597,9 +598,10 @@ class CloreClient:
while True:
try:
await monitoring.put("partner_service")
forwarding_latency_measurment = await clore_partner.measure_forwarding_latency()
if type(forwarding_latency_measurment) == list:
await WebSocketClient.set_forwarding_latency_measurment(forwarding_latency_measurment)
if self.start_time < utils.unix_timestamp() - 180:
forwarding_latency_measurment = await clore_partner.measure_forwarding_latency()
if type(forwarding_latency_measurment) == list:
await WebSocketClient.set_forwarding_latency_measurment(forwarding_latency_measurment)
partner_config = WebSocketClient.get_clore_partner_config()
if partner_config != None:
if self.clore_partner_initiazized == False: