File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 33
44from app .core .database import Base
55from app .core .database import async_engine as engine
6- from app .core .config import settings , DatabaseSettings , RedisCacheSettings
6+ from app .core .config import settings , DatabaseSettings , RedisCacheSettings , AppSettings
77from app .api import router
88from app .core import cache
99
@@ -25,12 +25,15 @@ async def close_redis_cache_pool():
2525
2626# -------------- application --------------
2727def create_application () -> FastAPI :
28- application = FastAPI (
29- title = settings .APP_NAME ,
30- description = settings .APP_DESCRIPTION ,
31- contact = settings .CONTACT ,
32- license_info = settings .CONTACT
33- )
28+ if isinstance (settings , AppSettings ):
29+ application = FastAPI (
30+ title = settings .APP_NAME ,
31+ description = settings .APP_DESCRIPTION ,
32+ contact = settings .CONTACT ,
33+ license_info = settings .CONTACT
34+ )
35+ else :
36+ application = FastAPI ()
3437
3538 application .include_router (router )
3639
You can’t perform that action at this time.
0 commit comments