MCPcopy Index your code
hub / github.com/vastsa/FileCodeBox / load_config

Function load_config

main.py:714–725  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

712
713
714async 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
727app = FastAPI(lifespan=lifespan)
728

Callers 1

lifespanFunction · 0.85

Calls 4

ensure_settings_rowFunction · 0.90
refresh_settingsFunction · 0.90
ensure_security_settingsFunction · 0.90
update_or_createMethod · 0.45

Tested by

no test coverage detected