From 29543b97665b984cc8b74622f4c87464b422f3fd Mon Sep 17 00:00:00 2001 From: phil Date: Sun, 5 May 2024 18:49:51 +0200 Subject: [PATCH] Allow init of redis without registry (useful for external scripts) --- src/gisaf/redis_tools.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gisaf/redis_tools.py b/src/gisaf/redis_tools.py index 279e875..cd451e2 100644 --- a/src/gisaf/redis_tools.py +++ b/src/gisaf/redis_tools.py @@ -95,14 +95,15 @@ class Store: """ asyncpg_conn: Connection - async def setup(self): + async def setup(self, with_registry=False): """ Setup the live service for the main Gisaf application: - Create connection for the publishers - Create connection for redis listeners (websocket service) """ await self.create_connections() - await self.get_live_layer_defs() + if with_registry: + await self.get_live_layer_defs() async def create_connections(self): """ @@ -433,7 +434,7 @@ class Store: async def setup_redis(): global store - await store.setup() + await store.setup(with_registry=True) async def setup_redis_cache():