Skip to content

Commit

Permalink
Merge pull request #477 from LACMTA:2023-api-optimization
Browse files Browse the repository at this point in the history
Refactor reader setting to 3 seconds
  • Loading branch information
albertkun authored Feb 3, 2024
2 parents 8a1faeb + b75808a commit 01a807f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastapi/app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ async def reader(channel: aioredis.client.PubSub):
await websocket.send_text(json.dumps(item))
except Exception as e:
await websocket.send_text(f"Error: {str(e)}")
await asyncio.sleep(0.5)
await asyncio.sleep(3)
except asyncio.TimeoutError:
pass

Expand Down

0 comments on commit 01a807f

Please sign in to comment.