Allow init of redis without registry (useful for external scripts)
This commit is contained in:
parent
53f2594cdd
commit
29543b9766
1 changed files with 4 additions and 3 deletions
|
@ -95,13 +95,14 @@ 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()
|
||||
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():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue