@xuda.io/xuda-worker-bundle-min 1.3.537 → 1.3.539

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.
Files changed (2) hide show
  1. package/index.js +13 -12
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -499,17 +499,6 @@ func.common.db = async function (
499
499
  }
500
500
 
501
501
  default:
502
- // try {
503
- // const json = await func.common.perform_rpi_request(
504
- // SESSION_ID,
505
- // serviceP,
506
- // opt,
507
- // data
508
- // );
509
- // return success_callback(json, true);
510
- // } catch (err) {
511
- // return error_callback(err);
512
- // }
513
502
  throw "";
514
503
  break;
515
504
  }
@@ -1068,6 +1057,15 @@ func.common.perform_rpi_request = async function (
1068
1057
  var _data_system = _session?.DS_GLB?.[0]?.data_system;
1069
1058
  if (_data_system) {
1070
1059
  _data_system.SYS_GLOBAL_BOL_AJAX_BUSY = 1;
1060
+ if (!_data_system.SYS_GLOBAL_BOL_CONNECTED) {
1061
+ func.utils.alerts.toast(
1062
+ SESSION_ID,
1063
+ "Server connection error",
1064
+ "You are not connected to the server, so your request cannot be processed.",
1065
+ "error"
1066
+ );
1067
+ return { code: 88, data: {} };
1068
+ }
1071
1069
  }
1072
1070
 
1073
1071
  const http = async function () {
@@ -1190,7 +1188,9 @@ func.common.get_data_from_websocket = async function (
1190
1188
  "get_ws_data_response_" + glb.websocket_queue_num,
1191
1189
  (e, data) => {
1192
1190
  resolve(data.data);
1193
- $("body").off("get_ws_data_response_" + glb.websocket_queue_num);
1191
+ $("body").off(
1192
+ "get_ws_data_response_" + data.e.websocket_queue_num
1193
+ );
1194
1194
  }
1195
1195
  );
1196
1196
  } else {
@@ -1725,6 +1725,7 @@ func.datasource.prepare = async function (
1725
1725
  _ds.data_system["SYS_GLOBAL_BOL_ONLINE"] = 0;
1726
1726
  _ds.data_system["SYS_GLOBAL_BOL_REPLICATION_STAT"] = 0;
1727
1727
  _ds.data_system["SYS_GLOBAL_BOL_AJAX_BUSY"] = 0;
1728
+ _ds.data_system["SYS_GLOBAL_BOL_CONNECTED"] = 0;
1728
1729
 
1729
1730
  _ds.data_system["SYS_GLOBAL_STR_FIREBASE_TOKEN_ID"] = 0;
1730
1731
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.537",
3
+ "version": "1.3.539",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {