@xuda.io/xuda-worker-bundle-min 1.3.1167 → 1.3.1169

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 +27 -8
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2198,7 +2198,21 @@ func.datasource.execute = async function (
2198
2198
  let prog_obj = await func.utils.VIEWS_OBJ.get(SESSION_ID, _ds.prog_id);
2199
2199
 
2200
2200
  const callback_datasource = async function () {
2201
- // if (typeof IS_WORKER !== "undefined") {
2201
+ if (typeof IS_WORKER === "undefined" && typeof IS_DOCKER === "undefined" ||
2202
+ typeof IS_PROCESS_SERVER === "undefined" && _ds.viewSourceProp === "globals") {
2203
+
2204
+ if (!["main"].includes(_session.opt.app_computing_mode)) {
2205
+
2206
+ await func.index.call_worker(SESSION_ID, {
2207
+ service: "create_webworker_globals",
2208
+ data: { ds_data: _ds, session_id: SESSION_ID },
2209
+ });
2210
+ }
2211
+
2212
+
2213
+ }
2214
+
2215
+
2202
2216
  if (
2203
2217
  await func.datasource.get_view_events_count(
2204
2218
  SESSION_ID,
@@ -3244,14 +3258,19 @@ func.datasource.run_events_functions = async function (
3244
3258
 
3245
3259
  }
3246
3260
  if (job_promises.length) {
3247
- Promise.all(job_promises)
3248
- .then((e) => {
3249
- resolve()
3250
- });
3251
-
3252
- } else {
3253
- resolve()
3261
+ await Promise.all(job_promises)
3254
3262
  }
3263
+ resolve()
3264
+
3265
+ // if (job_promises.length) {
3266
+ // Promise.all(job_promises)
3267
+ // .then((e) => {
3268
+ // resolve()
3269
+ // });
3270
+
3271
+ // } else {
3272
+ // resolve()
3273
+ // }
3255
3274
 
3256
3275
  })
3257
3276
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.1167",
3
+ "version": "1.3.1169",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {