feat(api): live flag for sessions
This commit is contained in:
parent
9a7cdb5b91
commit
fa407829b2
3 changed files with 5 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ jwt_algorithm=HS512
|
|||
jwt_exp_delta_seconds=2592000
|
||||
jwt_issuer=openreplay-default-foss
|
||||
jwt_secret="SET A RANDOM STRING HERE"
|
||||
Opeers=http://utilities-openreplay.app.svc.cluster.local:9000/assist/%s/sockets-list
|
||||
peersList=http://utilities-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-list
|
||||
peers=http://utilities-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-live
|
||||
pg_dbname=postgres
|
||||
pg_host=postgresql.db.svc.cluster.local
|
||||
|
|
|
|||
|
|
@ -72,13 +72,15 @@ def get_live_sessions_ws(project_id):
|
|||
print(connected_peers.text)
|
||||
return []
|
||||
live_peers = connected_peers.json().get("data", [])
|
||||
for s in live_peers:
|
||||
s["live"] = True
|
||||
return live_peers
|
||||
|
||||
|
||||
def is_live(project_id, session_id, project_key=None):
|
||||
if project_key is None:
|
||||
project_key = projects.get_project_key(project_id)
|
||||
connected_peers = requests.get(config("peers") % config("S3_KEY") + f"/{project_key}")
|
||||
connected_peers = requests.get(config("peersList") % config("S3_KEY") + f"/{project_key}")
|
||||
if connected_peers.status_code != 200:
|
||||
print("!! issue with the peer-server")
|
||||
print(connected_peers.text)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ jwt_algorithm=HS512
|
|||
jwt_exp_delta_seconds=2592000
|
||||
jwt_issuer=openreplay-default-ee
|
||||
jwt_secret="SET A RANDOM STRING HERE"
|
||||
Opeers=http://utilities-openreplay.app.svc.cluster.local:9000/assist/%s/sockets-list
|
||||
peersList=http://utilities-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-list
|
||||
peers=http://utilities-openreplay.app.svc.cluster.local:9001/assist/%s/sockets-live
|
||||
pg_dbname=postgres
|
||||
pg_host=postgresql.db.svc.cluster.local
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue