@xuda.io/xuda-worker-bundle-min 1.3.1174 → 1.3.1175

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 +49 -50
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2202,17 +2202,13 @@ func.datasource.execute = async function (
2202
2202
  typeof IS_PROCESS_SERVER === "undefined" && _ds.viewSourceProp === "globals") {
2203
2203
 
2204
2204
  if (!["main"].includes(_session.opt.app_computing_mode)) {
2205
-
2206
2205
  await func.index.call_worker(SESSION_ID, {
2207
2206
  service: "create_webworker_globals",
2208
2207
  data: { ds_data: _ds, session_id: SESSION_ID },
2209
2208
  });
2210
2209
  }
2211
-
2212
-
2213
2210
  }
2214
2211
 
2215
-
2216
2212
  if (
2217
2213
  await func.datasource.get_view_events_count(
2218
2214
  SESSION_ID,
@@ -3221,60 +3217,63 @@ func.datasource.run_events_functions = async function (
3221
3217
  calling_job,
3222
3218
  NA_calling_job_ds
3223
3219
  ) {
3224
- return new Promise(async (resolve, reject) => {
3225
- var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
3226
- var args = _ds.args;
3227
- // var v = _ds.v;
3228
- const _view_obj = await func.utils.VIEWS_OBJ.get(SESSION_ID, _ds.prog_id);
3229
- let job_promises = []
3230
- if (_view_obj.progEvents) {
3231
- for await (const [key, val] of Object.entries(_view_obj.progEvents)) {
3232
- if (
3233
- val.data.type === "user_defined" &&
3234
- val.data.event_name &&
3235
- val.data.event_name === event_id
3236
- ) {
3237
- const jobs = await func.events.validate(
3238
- SESSION_ID,
3239
- "user_defined",
3240
- dataSourceSession,
3241
- val.data.event_name,
3242
- args.callingSourceP,
3243
- val.data.parameters
3244
- );
3245
- for (job_num of jobs) {
3246
- job_promises.push(new Promise((resolve, reject) => {
3247
- const interval = setInterval(() => {
3248
- var job_index = func.events.find_job_index(SESSION_ID, job_num);
3249
- if (job_index == null) {
3250
- clearInterval(interval)
3251
- resolve(job_num);
3252
- }
3253
- }, 100);
3254
- }))
3255
- }
3220
+ // return new Promise(async (resolve, reject) => {
3221
+ var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
3222
+ var args = _ds.args;
3223
+ // var v = _ds.v;
3224
+ const _view_obj = await func.utils.VIEWS_OBJ.get(SESSION_ID, _ds.prog_id);
3225
+ // let job_promises = []
3226
+ if (_view_obj.progEvents) {
3227
+ for await (const [key, val] of Object.entries(_view_obj.progEvents)) {
3228
+ if (
3229
+ val.data.type === "user_defined" &&
3230
+ val.data.event_name &&
3231
+ val.data.event_name === event_id
3232
+ ) {
3233
+ const jobs = await func.events.validate(
3234
+ SESSION_ID,
3235
+ "user_defined",
3236
+ dataSourceSession,
3237
+ val.data.event_name,
3238
+ args.callingSourceP,
3239
+ val.data.parameters
3240
+ );
3241
+
3242
+ if (!calling_job) continue
3243
+
3244
+ for (job_num of jobs) {
3245
+ job_promises.push(new Promise((resolve, reject) => {
3246
+ const interval = setInterval(() => {
3247
+ var job_index = func.events.find_job_index(SESSION_ID, job_num);
3248
+ if (job_index == null) {
3249
+ clearInterval(interval)
3250
+ resolve(job_num);
3251
+ }
3252
+ }, 100);
3253
+ }))
3256
3254
  }
3257
3255
  }
3256
+ }
3258
3257
 
3259
3258
 
3260
3259
 
3261
- }
3262
- if (!calling_job && job_promises.length) {
3263
- await Promise.all(job_promises)
3264
- }
3265
- resolve()
3260
+ }
3261
+ if (job_promises.length) {
3262
+ await Promise.all(job_promises)
3263
+ }
3264
+ // resolve()
3266
3265
 
3267
- // if (job_promises.length) {
3268
- // Promise.all(job_promises)
3269
- // .then((e) => {
3270
- // resolve()
3271
- // });
3266
+ // if (job_promises.length) {
3267
+ // Promise.all(job_promises)
3268
+ // .then((e) => {
3269
+ // resolve()
3270
+ // });
3272
3271
 
3273
- // } else {
3274
- // resolve()
3275
- // }
3272
+ // } else {
3273
+ // resolve()
3274
+ // }
3276
3275
 
3277
- })
3276
+ // })
3278
3277
 
3279
3278
  };
3280
3279
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.1174",
3
+ "version": "1.3.1175",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {