@xuda.io/xuda-worker-bundle-min 1.3.513 → 1.3.515
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 +16 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -3460,7 +3460,12 @@ func.datasource.del = function (SESSION_ID, dsP) {
|
|
|
3460
3460
|
let _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsP];
|
|
3461
3461
|
if (_ds.worker_id) {
|
|
3462
3462
|
// if (_ds.data_xuda) console.log(dsP);
|
|
3463
|
-
if (
|
|
3463
|
+
if (
|
|
3464
|
+
RUNTIME_SERVER_WEBSOCKET &&
|
|
3465
|
+
RUNTIME_SERVER_WEBSOCKET_CONNECTED &&
|
|
3466
|
+
(!_session.opt.app_computing_mode ||
|
|
3467
|
+
_session.opt.app_computing_mode === "server")
|
|
3468
|
+
) {
|
|
3464
3469
|
WEB_WORKER[SESSION_ID][_ds.worker_id].emit("message", {
|
|
3465
3470
|
service: "close_websocket",
|
|
3466
3471
|
});
|
|
@@ -5824,6 +5829,16 @@ func.utils.ws_worker.functions = {
|
|
|
5824
5829
|
data: params,
|
|
5825
5830
|
});
|
|
5826
5831
|
},
|
|
5832
|
+
return_doc_from_websocket: function (params) {
|
|
5833
|
+
var SESSION_ID = params.session_id;
|
|
5834
|
+
function emitCustomEvent(eventName, detail) {
|
|
5835
|
+
const event = new CustomEvent(eventName, { detail });
|
|
5836
|
+
self.dispatchEvent(event);
|
|
5837
|
+
}
|
|
5838
|
+
emitCustomEvent("get_doc_obj_from_build_worker_" + params._id, {
|
|
5839
|
+
data: params,
|
|
5840
|
+
});
|
|
5841
|
+
},
|
|
5827
5842
|
heartbeat: async function (params) {
|
|
5828
5843
|
var SESSION_ID = params.session_id;
|
|
5829
5844
|
|