From e07879c45a92adac2f6aed6302569f9835e0f182 Mon Sep 17 00:00:00 2001 From: Anastasiia Pnevskaia Date: Tue, 19 Nov 2024 11:45:09 +0100 Subject: [PATCH] Minor corrections. --- src/backend/backend_ga4.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/backend/backend_ga4.py b/src/backend/backend_ga4.py index aaf54ee..e7bf474 100644 --- a/src/backend/backend_ga4.py +++ b/src/backend/backend_ga4.py @@ -14,11 +14,18 @@ import multiprocessing +def _send_func(request_data): + try: + request.urlopen(request_data) # nosec + except Exception as err: + pass # nosec + + class GA4Backend(TelemetryBackend): id = 'ga4' cid_filename = 'openvino_ga_cid' old_cid_filename = 'openvino_ga_uid' - timeout = 1.0 + timeout = 3.0 def __init__(self, tid: str = None, app_name: str = None, app_version: str = None): super(GA4Backend, self).__init__(tid, app_name, app_version) @@ -38,11 +45,6 @@ def send(self, message: dict): if message is None: return try: - def _send_func(request_data): - try: - request.urlopen(request_data) # nosec - except Exception as err: - pass # nosec data = json.dumps(message).encode() if self.backend_url.lower().startswith('http'):