@be-link/ecommerce-promotion-service-node-sdk 0.1.13 → 0.1.14
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/modules/BaseService.d.ts +1 -1
- package/modules/BaseService.js +1 -1
- package/package.json +1 -1
- package/utils/http.js +1 -1
package/modules/BaseService.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export default abstract class BaseService {
|
|
|
8
8
|
protected abstract prefixUrl: string;
|
|
9
9
|
/** 子网域名 */
|
|
10
10
|
protected readonly natDevHost = "http://192.168.3.168:8090/promotion";
|
|
11
|
-
protected readonly natProdHost = "http://
|
|
11
|
+
protected readonly natProdHost = "http://10.1.0.97:8090/promotion";
|
|
12
12
|
/** 公网域名 */
|
|
13
13
|
protected readonly publicDevHost = "https://ecommerce-dev.wejourney.top/promotion";
|
|
14
14
|
protected readonly publicProdHost = "";
|
package/modules/BaseService.js
CHANGED
|
@@ -13,7 +13,7 @@ class BaseService {
|
|
|
13
13
|
constructor() {
|
|
14
14
|
/** 子网域名 */
|
|
15
15
|
this.natDevHost = 'http://192.168.3.168:8090/promotion';
|
|
16
|
-
this.natProdHost = 'http://
|
|
16
|
+
this.natProdHost = 'http://10.1.0.97:8090/promotion';
|
|
17
17
|
/** 公网域名 */
|
|
18
18
|
this.publicDevHost = 'https://ecommerce-dev.wejourney.top/promotion';
|
|
19
19
|
this.publicProdHost = '';
|
package/package.json
CHANGED
package/utils/http.js
CHANGED
|
@@ -19,7 +19,7 @@ const HTTP_CONFIG = {
|
|
|
19
19
|
maxFreeSockets: 1000, // 空闲socket保留数(50%复用率,提高连接复用效率)
|
|
20
20
|
maxTotalSockets: 3000, // 所有主机总socket数(单后端场景优化)
|
|
21
21
|
keepAliveMsecs: 30000, // 保持连接30秒(平衡资源占用和连接复用)
|
|
22
|
-
timeout:
|
|
22
|
+
timeout: 8000, // socket超时3秒(高并发场景快速失败)
|
|
23
23
|
requestTimeout: 3000, // 请求超时3秒(快速释放资源,避免慢请求占用连接)
|
|
24
24
|
retries: 1, // 重试1次(减少重试,避免高并发时加重后端压力)
|
|
25
25
|
retryBaseDelay: 100, // 基础重试延迟100ms(给服务恢复时间)
|