@xuda.io/xuda-worker-bundle-min 1.3.534 → 1.3.536
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 +20 -19
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1057,7 +1057,7 @@ func.api.call_api_program = async function (prog_id, params) {
|
|
|
1057
1057
|
|
|
1058
1058
|
return await api_utils.call_api_program(prog_id, params, null);
|
|
1059
1059
|
};
|
|
1060
|
-
|
|
1060
|
+
glb.rpi_request_queue_num = 0;
|
|
1061
1061
|
func.common.perform_rpi_request = async function (
|
|
1062
1062
|
SESSION_ID,
|
|
1063
1063
|
serviceP,
|
|
@@ -1065,6 +1065,11 @@ func.common.perform_rpi_request = async function (
|
|
|
1065
1065
|
data
|
|
1066
1066
|
) {
|
|
1067
1067
|
var _session = SESSION_OBJ[SESSION_ID];
|
|
1068
|
+
var _data_system = _session?.DS_GLB?.[0]?.data_system;
|
|
1069
|
+
if (_data_system) {
|
|
1070
|
+
_data_system.SYS_GLOBAL_BOL_AJAX_BUSY = 1;
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1068
1073
|
const http = async function () {
|
|
1069
1074
|
const fetchWithTimeout = (url, options = {}, timeout = 600000) => {
|
|
1070
1075
|
// 100 seconds
|
|
@@ -1121,36 +1126,31 @@ func.common.perform_rpi_request = async function (
|
|
|
1121
1126
|
return {};
|
|
1122
1127
|
}
|
|
1123
1128
|
};
|
|
1124
|
-
// const ws = async function () {
|
|
1125
|
-
// glb.websocket_queue_num++;
|
|
1126
|
-
// RUNTIME_SERVER_WEBSOCKET.emit("message", {
|
|
1127
|
-
// service: serviceP,
|
|
1128
|
-
// data,
|
|
1129
|
-
// websocket_queue_num: glb.websocket_queue_num,
|
|
1130
|
-
// });
|
|
1131
|
-
// throw new Error("fail to fetch from ws");
|
|
1132
|
-
// };
|
|
1133
1129
|
|
|
1134
1130
|
try {
|
|
1135
1131
|
if (_session.engine_mode === "live_preview") {
|
|
1136
1132
|
throw new Error("live_preview");
|
|
1137
1133
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)
|
|
1142
|
-
) {
|
|
1143
|
-
// return await ws();
|
|
1144
|
-
return await func.common.get_data_from_websocket(
|
|
1134
|
+
|
|
1135
|
+
if (SESSION_OBJ?.[SESSION_ID]?.rpi_http_methods?.includes(serviceP)) {
|
|
1136
|
+
const ret = await func.common.get_data_from_websocket(
|
|
1145
1137
|
SESSION_ID,
|
|
1146
1138
|
serviceP,
|
|
1147
1139
|
data
|
|
1148
1140
|
);
|
|
1141
|
+
if (_data_system) {
|
|
1142
|
+
_data_system.SYS_GLOBAL_BOL_AJAX_BUSY = 0;
|
|
1143
|
+
}
|
|
1144
|
+
return ret;
|
|
1149
1145
|
} else {
|
|
1150
1146
|
throw new Error("method not found in rpi_http_methods");
|
|
1151
1147
|
}
|
|
1152
1148
|
} catch (err) {
|
|
1153
|
-
|
|
1149
|
+
const ret = await http();
|
|
1150
|
+
if (_data_system) {
|
|
1151
|
+
_data_system.SYS_GLOBAL_BOL_AJAX_BUSY = 0;
|
|
1152
|
+
}
|
|
1153
|
+
return ret;
|
|
1154
1154
|
}
|
|
1155
1155
|
};
|
|
1156
1156
|
|
|
@@ -1724,6 +1724,7 @@ func.datasource.prepare = async function (
|
|
|
1724
1724
|
|
|
1725
1725
|
_ds.data_system["SYS_GLOBAL_BOL_ONLINE"] = 0;
|
|
1726
1726
|
_ds.data_system["SYS_GLOBAL_BOL_REPLICATION_STAT"] = 0;
|
|
1727
|
+
_ds.data_system["SYS_GLOBAL_BOL_AJAX_BUSY"] = 0;
|
|
1727
1728
|
|
|
1728
1729
|
_ds.data_system["SYS_GLOBAL_STR_FIREBASE_TOKEN_ID"] = 0;
|
|
1729
1730
|
|
|
@@ -5116,7 +5117,7 @@ func.utils.job_worker = function (session_id) {
|
|
|
5116
5117
|
}, 310);
|
|
5117
5118
|
} else {
|
|
5118
5119
|
if (!glb.IS_WORKER) {
|
|
5119
|
-
func.UI.screen.garbage_collector(SESSION_ID);
|
|
5120
|
+
// func.UI.screen.garbage_collector(SESSION_ID);
|
|
5120
5121
|
}
|
|
5121
5122
|
}
|
|
5122
5123
|
};
|