Live_System / codexmesh_stream.py
LordXido's picture
Create codexmesh_stream.py
f62e932 verified
raw
history blame contribute delete
280 Bytes
import asyncio
from datetime import datetime
from ws_router import broadcast
async def emit_event(event_type: str, payload: dict):
event = {
"type": event_type,
"time": datetime.utcnow().isoformat(),
"payload": payload
}
await broadcast(event)