从数据库读取最新配置并应用到运行时。
()
| 69 | |
| 70 | |
| 71 | async def refresh_settings() -> None: |
| 72 | """从数据库读取最新配置并应用到运行时。""" |
| 73 | config_record = await KeyValue.filter(key="settings").first() |
| 74 | settings.user_config = config_record.value if config_record and config_record.value else {} |
| 75 | _sync_ip_limits() |
| 76 | |
| 77 | |
| 78 | def is_runtime_initialized() -> bool: |
no test coverage detected