abler-api 0.1.63 → 0.1.65
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/dist/cjs/pp-util.js +7 -3
- package/package.json +1 -1
package/dist/cjs/pp-util.js
CHANGED
|
@@ -57,10 +57,12 @@ class apiUtil$2 {
|
|
|
57
57
|
}; // static apiCallRecSaver;
|
|
58
58
|
|
|
59
59
|
static config(appConfig, appErrCfg, appDbSql) {
|
|
60
|
-
ppUtil$4.config(appConfig, appErrCfg);
|
|
61
60
|
conf$3 = appConfig;
|
|
62
61
|
appSetting$1 = conf$3?.appSetting;
|
|
63
|
-
err$2 = appErrCfg
|
|
62
|
+
err$2 = appErrCfg;
|
|
63
|
+
dbSql = appDbSql;
|
|
64
|
+
ppUtil$4.config(appConfig, appErrCfg);
|
|
65
|
+
kvStorage$1.config(appConfig, appErrCfg);
|
|
64
66
|
apiUtil$2.debugFlag = appSetting$1?.debugFlag || apiUtil$2.debugFlag;
|
|
65
67
|
apiUtil$2.testFlag = appSetting$1?.testFlag || apiUtil$2.testFlag; // apiUtil.apiCallRecSaver = apiCallRecSaver;
|
|
66
68
|
} //#region ===== 需要应用系统重写的方法
|
|
@@ -1806,7 +1808,9 @@ async function initKvStorage(dbSql) {
|
|
|
1806
1808
|
try {
|
|
1807
1809
|
kvStorage.config(conf$2, err$1);
|
|
1808
1810
|
|
|
1809
|
-
if (
|
|
1811
|
+
if (conf$2.redis.enabled) {
|
|
1812
|
+
kvStorage.setRedis(ppRedis.newClient("kv"));
|
|
1813
|
+
} else {
|
|
1810
1814
|
kvStorage.setRedis(new redisSimulator(dbSql));
|
|
1811
1815
|
}
|
|
1812
1816
|
} catch (e) {
|