Mark Duppenthaler commited on
Commit
343dd34
1 Parent(s): bb98523

Backend changes to read in MAX_SPEAKERS env var

Browse files
Files changed (1) hide show
  1. seamless_server/app_pubsub.py +3 -3
seamless_server/app_pubsub.py CHANGED
@@ -124,7 +124,7 @@ class ServerLock(TypedDict):
124
  member_object: Member
125
 
126
 
127
- if os.environ.get("LOCK_SERVER_COMPLETELY", "0") == "1":
128
  logger.info("LOCK_SERVER_COMPLETELY is set. Server will be locked on startup.")
129
  dummy_server_lock_member_object = Member(
130
  client_id="seamless_user", session_id="dummy", name="Seamless User"
@@ -137,7 +137,7 @@ server_lock: Optional[ServerLock] = (
137
  "client_id": "seamless_user",
138
  "member_object": dummy_server_lock_member_object,
139
  }
140
- if os.environ.get("LOCK_SERVER_COMPLETELY", "0") == "1"
141
  else None
142
  )
143
 
@@ -517,7 +517,7 @@ async def join_room(sid, client_id, room_id_from_client, config_dict):
517
  and config_dict.get("lockServerName")
518
  == ESCAPE_HATCH_SERVER_LOCK_RELEASE_NAME
519
  # If we are locking the server completely we don't want someone to be able to unlock it
520
- and not os.environ.get("LOCK_SERVER_COMPLETELY", "0") == "1"
521
  ):
522
  server_lock = None
523
  logger.info(
 
124
  member_object: Member
125
 
126
 
127
+ if os.environ.get("LOCK_SERVER_COMPLETELY"):
128
  logger.info("LOCK_SERVER_COMPLETELY is set. Server will be locked on startup.")
129
  dummy_server_lock_member_object = Member(
130
  client_id="seamless_user", session_id="dummy", name="Seamless User"
 
137
  "client_id": "seamless_user",
138
  "member_object": dummy_server_lock_member_object,
139
  }
140
+ if os.environ.get("LOCK_SERVER_COMPLETELY")
141
  else None
142
  )
143
 
 
517
  and config_dict.get("lockServerName")
518
  == ESCAPE_HATCH_SERVER_LOCK_RELEASE_NAME
519
  # If we are locking the server completely we don't want someone to be able to unlock it
520
+ and not os.environ.get("LOCK_SERVER_COMPLETELY")
521
  ):
522
  server_lock = None
523
  logger.info(