diff --git a/clore_hosting/main.py b/clore_hosting/main.py index fef7e78..f9031c5 100644 --- a/clore_hosting/main.py +++ b/clore_hosting/main.py @@ -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: