perf(connection): 优化数据库连接池配置并升级 Dify 相关依赖
- 配置 Hikari 连接池的 max-lifetime、idle-timeout 和 validation-timeout 参数,提高数据库连接效率- 将 Dify Spring Boot Starter 依赖版本从 0.9.0 升级到 0.11.0 -优化 V1DatasetController 中的 deleteDocument 方法,移除冗余的返回类型 - 修正 V1WorkflowController 中的 logs 方法,添加缺失的返回语句
This commit is contained in:
parent
426e57c5ac
commit
f488856412
2
pom.xml
2
pom.xml
@ -41,7 +41,7 @@
|
||||
<dependency>
|
||||
<groupId>io.github.guoshiqiufeng.dify</groupId>
|
||||
<artifactId>dify-spring-boot-starter</artifactId>
|
||||
<version>0.9.0</version>
|
||||
<version>0.11.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
@ -78,8 +78,8 @@ public class V1DatasetController {
|
||||
*/
|
||||
@DeleteMapping("/deleteDocument")
|
||||
@PreAuthorize("hasAuthority('dify:dataset:delete')")
|
||||
public DocumentDeleteResponse deleteDocument(String datasetId, String documentId){
|
||||
return difyDataset.deleteDocument(datasetId, documentId, apiKey);
|
||||
public void deleteDocument(String datasetId, String documentId){
|
||||
difyDataset.deleteDocument(datasetId, documentId, apiKey);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -80,10 +80,11 @@ public class V1WorkflowController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/logs/{appId}")
|
||||
@PreAuthorize("hasAuthority('difyWorkFlow:log')")
|
||||
@PreAuthorize("hasAuthority('dify:workflow:log')")
|
||||
public DifyPageResult<WorkflowLogs> logs(@RequestBody WorkflowLogsRequest request, @PathVariable String appId) {
|
||||
String apiKey = appEntityRepository.selectApiKey(appId);
|
||||
request.setApiKey(apiKey);
|
||||
return difyWorkflow.logs(request);
|
||||
final DifyPageResult<WorkflowLogs> logs = difyWorkflow.logs(request);
|
||||
return logs;
|
||||
}
|
||||
}
|
||||
|
@ -22,6 +22,10 @@ spring:
|
||||
username: gitea
|
||||
password: gitea
|
||||
driver-class-name: org.postgresql.Driver
|
||||
hikari:
|
||||
max-lifetime: 1800000
|
||||
idle-timeout: 600000
|
||||
validation-timeout: 5000
|
||||
data:
|
||||
redis:
|
||||
host: 43.139.10.64
|
||||
|
Loading…
Reference in New Issue
Block a user