@xuda.io/xuda-worker-bundle-min 1.3.1171 → 1.3.1173

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 +15 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -3234,7 +3234,7 @@ func.datasource.run_events_functions = async function (
3234
3234
  val.data.event_name &&
3235
3235
  val.data.event_name === event_id
3236
3236
  ) {
3237
- const job_num = await func.events.validate(
3237
+ const jobs = await func.events.validate(
3238
3238
  SESSION_ID,
3239
3239
  "user_defined",
3240
3240
  dataSourceSession,
@@ -3242,24 +3242,26 @@ func.datasource.run_events_functions = async function (
3242
3242
  args.callingSourceP,
3243
3243
  val.data.parameters
3244
3244
  );
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
- }))
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
+ }
3254
3256
  }
3255
3257
  }
3256
3258
 
3257
3259
 
3258
3260
 
3259
3261
  }
3260
- // if (job_promises.length) {
3261
- // await Promise.all(job_promises)
3262
- // }
3262
+ if (job_promises.length) {
3263
+ await Promise.all(job_promises)
3264
+ }
3263
3265
  resolve()
3264
3266
 
3265
3267
  // if (job_promises.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.1171",
3
+ "version": "1.3.1173",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {