From 53e58f7d5d3a9f6671027070a23e7076270815c9 Mon Sep 17 00:00:00 2001 From: Mehdi Osman Date: Wed, 9 Mar 2022 23:31:21 +0100 Subject: [PATCH 1/2] Update license to ELv2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd248aea5..b943773e6 100644 --- a/README.md +++ b/README.md @@ -88,4 +88,4 @@ Check out our [roadmap](https://www.notion.so/openreplay/Roadmap-889d2c3d968b478 ## License -This repo is entirely MIT licensed, with the exception of the `ee` directory. +This repo is under the Elastic License 2.0 (ELv2), with the exception of the `ee` directory. From 0c3e2cb68df875656c8b08ae0943605291c6aba6 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 10 Mar 2022 11:15:25 +0100 Subject: [PATCH 2/2] feat(api): changed live check --- api/chalicelib/core/assist.py | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/api/chalicelib/core/assist.py b/api/chalicelib/core/assist.py index aee8a97f5..70f563ec8 100644 --- a/api/chalicelib/core/assist.py +++ b/api/chalicelib/core/assist.py @@ -71,7 +71,18 @@ def get_live_sessions_ws(project_id): print("!! issue with the peer-server") print(connected_peers.text) return [] - live_peers = connected_peers.json().get("data", []) + try: + live_peers = connected_peers.json().get("data", []) + except Exception as e: + print("issue getting Live-Assist response") + print(str(e)) + print("expected JSON, received:") + try: + print(connected_peers.text) + except: + print("couldn't get response") + live_peers = [] + for s in live_peers: s["live"] = True s["projectId"] = project_id @@ -95,7 +106,17 @@ def is_live(project_id, session_id, project_key=None): print("!! issue with the peer-server") print(connected_peers.text) return False - connected_peers = connected_peers.json().get("data", []) + try: + connected_peers = connected_peers.json().get("data", []) + except Exception as e: + print("issue getting Assist response") + print(str(e)) + print("expected JSON, received:") + try: + print(connected_peers.text) + except: + print("couldn't get response") + return False return str(session_id) in connected_peers