Fix the lint issue

This commit is contained in:
Samuel Chan
2025-01-04 18:34:35 +08:00
parent db663114a9
commit e053223ef0
4 changed files with 26 additions and 30 deletions

View File

@@ -1137,4 +1137,4 @@ SQL_TEMPLATES = {
FROM LIGHTRAG_DOC_CHUNKS where workspace=$1)
WHERE distance>$2 ORDER BY distance DESC LIMIT $3
"""
}
}

View File

@@ -20,10 +20,9 @@ if sys.platform.startswith("win"):
async def get_pool():
return await asyncpg.create_pool(
f"postgres://{USER}:{PASSWORD}@{HOST}:{PORT}/{DB}",
min_size=10, # 连接池初始化时默认的最小连接数, 默认为1 0
max_size=10, # 连接池的最大连接数, 默认为 10
max_queries=5000, # 每个链接最大查询数量, 超过了就换新的连接, 默认 5000
# 最大不活跃时间, 默认 300.0, 超过这个时间的连接就会被关闭, 传入 0 的话则永不关闭
min_size=10,
max_size=10,
max_queries=5000,
max_inactive_connection_lifetime=300.0
)
@@ -118,5 +117,3 @@ async def main():
if __name__ == '__main__':
asyncio.run(query_with_age())