Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba348a35b7 |
+1
-1
@@ -18,7 +18,7 @@ NO_CACHE_HEADERS = {"Cache-Control": "no-cache"}
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
async def lifespan(app_: FastAPI) -> AsyncGenerator[None]:
|
async def lifespan({% if use_dishka %}app_{% else %}_app{% endif %}: FastAPI) -> AsyncGenerator[None]:
|
||||||
setup_logging()
|
setup_logging()
|
||||||
{%- if database != 'none' %}
|
{%- if database != 'none' %}
|
||||||
await init_db()
|
await init_db()
|
||||||
|
|||||||
Reference in new issue
Block a user