fix (data): Parallel connection pool.

This commit is contained in:
2023-08-23 17:31:38 +03:00
parent 5bca9bca33
commit df9b835cd5
27 changed files with 1175 additions and 1021 deletions

View File

@@ -52,7 +52,7 @@ class EventHandler(Generic[T]):
f"Queue on event handler {self.route_name} is full! Discarding event {data}"
)
@log_wrap(action='consumer', isolate=False)
@log_wrap(action='consumer')
async def consumer(self):
while True:
try:
@@ -76,7 +76,7 @@ class EventHandler(Generic[T]):
)
pass
@log_wrap(action='batch', isolate=False)
@log_wrap(action='batch')
async def process_batch(self):
logger.debug("Processing Batch")
# TODO: copy syntax might be more efficient here

View File

@@ -123,7 +123,7 @@ class AnalyticsServer:
log_action_stack.set(['Analytics'])
log_app.set(conf.analytics['appname'])
async with await self.db.connect():
async with self.db.open():
await self.talk.connect()
await self.attach_event_handlers()
self._snap_task = asyncio.create_task(self.snapshot_loop())