@xuda.io/xuda-worker-bundle-min 1.3.489 → 1.3.491
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/index.js +6 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -416,7 +416,7 @@ func.common.db = async function (
|
|
|
416
416
|
// (await func.db.pouch.get_replication_stat(SESSION_ID)) &&
|
|
417
417
|
// (_session.engine_mode === "live_preview" ||
|
|
418
418
|
// APP_OBJ[_session.APP_ID].app_available_offline)
|
|
419
|
-
if (await func
|
|
419
|
+
if (await func?.db?.pouch?.get_replication_stat(SESSION_ID)) {
|
|
420
420
|
const db = await func.utils.connect_pouchdb(SESSION_ID);
|
|
421
421
|
switch (serviceP) {
|
|
422
422
|
case "dbs_read": {
|
|
@@ -1019,7 +1019,6 @@ func.common.perform_rpi_request = async function (
|
|
|
1019
1019
|
opt = {},
|
|
1020
1020
|
data
|
|
1021
1021
|
) {
|
|
1022
|
-
debugger;
|
|
1023
1022
|
const http = async function () {
|
|
1024
1023
|
var url = func.common.get_url(SESSION_ID, "rpi", "");
|
|
1025
1024
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
@@ -1058,7 +1057,11 @@ func.common.perform_rpi_request = async function (
|
|
|
1058
1057
|
});
|
|
1059
1058
|
};
|
|
1060
1059
|
|
|
1061
|
-
if (
|
|
1060
|
+
if (
|
|
1061
|
+
RUNTIME_SERVER_WEBSOCKET &&
|
|
1062
|
+
RUNTIME_SERVER_WEBSOCKET_CONNECTED &&
|
|
1063
|
+
SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)
|
|
1064
|
+
) {
|
|
1062
1065
|
return await ws();
|
|
1063
1066
|
} else {
|
|
1064
1067
|
return await http();
|