meellc
HOBBY
3 days ago
Hey all! I'm deploying a FastAPI + Celery backend on Railway. The app tries to connect to the database using await database.connect() inside my lifespan function, but I'm getting this error:
NameError: name 'database' is not defined
I do have a DATABASE_URL set in my environment variables, and I'm using the databases library with asyncpg.
Any idea what I might be missing, or how I should properly structure this? Thanks!