fix: remove default user creation on start
This commit is contained in:
parent
01582d7a55
commit
c257bc7d87
1 changed files with 0 additions and 2 deletions
|
|
@ -33,11 +33,9 @@ from contextlib import asynccontextmanager
|
||||||
@asynccontextmanager
|
@asynccontextmanager
|
||||||
async def lifespan(app: FastAPI):
|
async def lifespan(app: FastAPI):
|
||||||
from cognee.infrastructure.databases.relational import create_db_and_tables
|
from cognee.infrastructure.databases.relational import create_db_and_tables
|
||||||
from cognee.modules.users.methods import get_default_user
|
|
||||||
|
|
||||||
# Not needed if you setup a migration system like Alembic
|
# Not needed if you setup a migration system like Alembic
|
||||||
await create_db_and_tables()
|
await create_db_and_tables()
|
||||||
await get_default_user()
|
|
||||||
yield
|
yield
|
||||||
|
|
||||||
app = FastAPI(debug = os.getenv("ENV", "prod") != "prod", lifespan = lifespan)
|
app = FastAPI(debug = os.getenv("ENV", "prod") != "prod", lifespan = lifespan)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue