developmentseed / eoAPI

[Active Development] Earth Observation API (Metadata, Raster and Vector services)
https://eoapi.dev
MIT License
196 stars 21 forks source link

new FastAPI lifespan might not work in lambda #102

Closed vincentsarago closed 1 year ago

vincentsarago commented 1 year ago

https://github.com/developmentseed/eoAPI/blob/0798309b1506f1be7a6079d9325e3b05dc1dbcf5/infrastructure/aws/handlers/vector_handler.py#L15-L17

previously we were checking if we were in AWS Lambda to run the startup event but with the new lifespan method implemented in latest FastAPI (and used in tipg https://github.com/developmentseed/tipg/blob/main/tipg/main.py#L32-L59) we might have the same issue

ref:

vincentsarago commented 1 year ago

I confirmed this. There is no more app.router.startup for the tipg application 🤦