neuralworm commited on
Commit
8fe28af
·
verified ·
1 Parent(s): 6b9acd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -194,7 +194,7 @@ async def websocket_endpoint(websocket: WebSocket):
194
 
195
  # Wait for session init
196
  while not system.ready:
197
- await asyncio.sleep(0.1)
198
 
199
  # Send initial history
200
  history_msgs = [
@@ -206,7 +206,7 @@ async def websocket_endpoint(websocket: WebSocket):
206
  async def _emit_state():
207
  while True:
208
  if not system.ready:
209
- await asyncio.sleep(1)
210
  continue
211
 
212
  try:
@@ -275,7 +275,7 @@ async def websocket_endpoint(websocket: WebSocket):
275
  # print(f"Broadcast Error: {e}")
276
  pass
277
 
278
- await asyncio.sleep(0.05) # 20Hz update
279
 
280
  async def _receive_messages():
281
  try:
 
194
 
195
  # Wait for session init
196
  while not system.ready:
197
+ await asyncio.sleep(system.tick_delay)
198
 
199
  # Send initial history
200
  history_msgs = [
 
206
  async def _emit_state():
207
  while True:
208
  if not system.ready:
209
+ await asyncio.sleep(system.tick_delay)
210
  continue
211
 
212
  try:
 
275
  # print(f"Broadcast Error: {e}")
276
  pass
277
 
278
+ await asyncio.sleep(system.tick_delay)
279
 
280
  async def _receive_messages():
281
  try: