Spaces:
Running
Running
Download notifications.py from ZHIWEI666/ComfyUI-Ranking-API: direct link, hf CLI and curl.
- Browser
- Download file 385 Bytes
-
https://huggingface.co/spaces/ZHIWEI666/ComfyUI-Ranking-API/resolve/main/notifications.py
- Command line
-
hf download hf://spaces/ZHIWEI666/ComfyUI-Ranking-API/notifications.py
-
curl -L -o notifications.py https://huggingface.co/spaces/ZHIWEI666/ComfyUI-Ranking-API/resolve/main/notifications.py
385 Bytes
| import notification_store | |
| def add_notification(target_account: str, notif_data: dict): | |
| try: | |
| notification_store.append_notification(target_account, notif_data) | |
| except Exception as error: | |
| # 通知属于派生操作,故障不影响已经完成的业务;不打印账号/正文。 | |
| print(f"通知写入失败: error_type={type(error).__name__}") | |