()
| 712 | |
| 713 | |
| 714 | async def load_config(): |
| 715 | await ensure_settings_row() |
| 716 | await KeyValue.update_or_create( |
| 717 | key="sys_start", defaults={"value": int(time.time() * 1000)} |
| 718 | ) |
| 719 | await refresh_settings() |
| 720 | await ensure_security_settings() |
| 721 | |
| 722 | ip_limit["error"].minutes = settings.errorMinute |
| 723 | ip_limit["error"].count = settings.errorCount |
| 724 | ip_limit["upload"].minutes = settings.uploadMinute |
| 725 | ip_limit["upload"].count = settings.uploadCount |
| 726 | |
| 727 | app = FastAPI(lifespan=lifespan) |
| 728 |
no test coverage detected