befly 3.5.6 → 3.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/database.ts +2 -2
- package/package.json +2 -2
- package/plugins/db.ts +1 -1
- package/types/database.d.ts +1 -1
package/lib/database.ts
CHANGED
|
@@ -62,7 +62,7 @@ export class Database {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
try {
|
|
65
|
-
const timeout = options.connectionTimeout ??
|
|
65
|
+
const timeout = options.connectionTimeout ?? 30000;
|
|
66
66
|
|
|
67
67
|
const healthCheckPromise = (async () => {
|
|
68
68
|
let version = '';
|
|
@@ -174,7 +174,7 @@ export class Database {
|
|
|
174
174
|
const url = `redis://${auth}${REDIS_HOST}:${REDIS_PORT}/${REDIS_DB}`;
|
|
175
175
|
|
|
176
176
|
const redis = new RedisClient(url, {
|
|
177
|
-
connectionTimeout:
|
|
177
|
+
connectionTimeout: 30000,
|
|
178
178
|
idleTimeout: 0,
|
|
179
179
|
autoReconnect: true,
|
|
180
180
|
maxRetries: 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.7",
|
|
4
4
|
"description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"es-toolkit": "^1.41.0",
|
|
81
81
|
"pathe": "^2.0.3"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "00363a4b337d54d88822e284dcd555b3f678a630"
|
|
84
84
|
}
|
package/plugins/db.ts
CHANGED
|
@@ -24,7 +24,7 @@ const dbPlugin: Plugin = {
|
|
|
24
24
|
if (Env.DB_ENABLE === 1) {
|
|
25
25
|
// 创建 Bun SQL 客户端(内置连接池),并确保连接验证成功后再继续
|
|
26
26
|
// 从环境变量读取连接超时配置
|
|
27
|
-
const connectionTimeout = Env.DB_CONNECTION_TIMEOUT ? parseInt(Env.DB_CONNECTION_TIMEOUT) :
|
|
27
|
+
const connectionTimeout = Env.DB_CONNECTION_TIMEOUT ? parseInt(Env.DB_CONNECTION_TIMEOUT) : 30000;
|
|
28
28
|
|
|
29
29
|
sql = await Database.connectSql({
|
|
30
30
|
connectionTimeout
|
package/types/database.d.ts
CHANGED