Files
fastapi-best-architecture/backend/common/socketio/action.py
T
Wu Clan 493c2b2545 Add asynchronous socketio application server (#437)
* Add asynchronous socketio application server

* fix uv lock

* Update cors

* fix socket app
2024-11-02 00:12:01 +08:00

14 lines
252 B
Python

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from backend.common.socketio.server import sio
async def task_notification(msg: str):
"""
任务通知
:param msg:
:return:
"""
await sio.emit('task_notification', {'msg': msg})