[P] Send only visible records from store on websocket connection
This commit is contained in:
@@ -47,7 +47,10 @@ async def websocket_endpoint(websocket: WebSocket):
|
||||
|
||||
try:
|
||||
# send already available data
|
||||
r = processed_agent_data.select().order_by(processed_agent_data.c.timestamp)
|
||||
r = processed_agent_data.select() \
|
||||
.where(processed_agent_data.c.visible == True) \
|
||||
.order_by(processed_agent_data.c.timestamp)
|
||||
|
||||
session = SessionLocal()
|
||||
stored_data = session.execute(r).fetchall()
|
||||
session.close()
|
||||
|
||||
Reference in New Issue
Block a user