16 lines
339 B
Python
16 lines
339 B
Python
from aioch import Client
|
|
|
|
from core.config import settings
|
|
from .ckdb import CKDrive
|
|
|
|
|
|
async def connect_to_ck(pool_size=15):
|
|
for i in range(pool_size):
|
|
client = Client(**settings.CK_CONFIG)
|
|
CKDrive.ClientPool.add(client)
|
|
|
|
|
|
async def close_ck_connection():
|
|
for c in CKDrive.ClientPool:
|
|
await c.disconnect()
|