Add live (redis and websockets)

Add modernised ipynb_tools
Add scheduler
Fix crs in settings
Lots of small fixes
This commit is contained in:
phil 2023-12-21 10:51:31 +05:30
parent 461c31fb6f
commit 47df53f4d1
15 changed files with 1614 additions and 61 deletions

View file

@ -12,9 +12,9 @@ from .geoapi import api as geoapi
from .config import conf
from .registry import registry, ModelRegistry
from .redis_tools import setup_redis, shutdown_redis, setup_redis_cache
from .live import setup_live
logging.basicConfig(level=conf.gisaf.debugLevel)
logger = logging.getLogger(__name__)
## Subclass FastAPI to add attributes to be used globally, ie. registry
@ -29,9 +29,11 @@ class GisafFastAPI(FastAPI):
@asynccontextmanager
async def lifespan(app: FastAPI):
await registry.make_registry(app)
await setup_redis(app)
await registry.make_registry()
await setup_redis()
await setup_live()
yield
await shutdown_redis()
app = FastAPI(
debug=False,