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,14 +95,15 @@ class Store:
|
||||||
"""
|
"""
|
||||||
asyncpg_conn: Connection
|
asyncpg_conn: Connection
|
||||||
|
|
||||||
async def setup(self):
|
async def setup(self, with_registry=False):
|
||||||
"""
|
"""
|
||||||
Setup the live service for the main Gisaf application:
|
Setup the live service for the main Gisaf application:
|
||||||
- Create connection for the publishers
|
- Create connection for the publishers
|
||||||
- Create connection for redis listeners (websocket service)
|
- Create connection for redis listeners (websocket service)
|
||||||
"""
|
"""
|
||||||
await self.create_connections()
|
await self.create_connections()
|
||||||
await self.get_live_layer_defs()
|
if with_registry:
|
||||||
|
await self.get_live_layer_defs()
|
||||||
|
|
||||||
async def create_connections(self):
|
async def create_connections(self):
|
||||||
"""
|
"""
|
||||||
|
@ -433,7 +434,7 @@ class Store:
|
||||||
|
|
||||||
async def setup_redis():
|
async def setup_redis():
|
||||||
global store
|
global store
|
||||||
await store.setup()
|
await store.setup(with_registry=True)
|
||||||
|
|
||||||
|
|
||||||
async def setup_redis_cache():
|
async def setup_redis_cache():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue