@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.
- package/index.js +15 -13
- 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
|
|
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
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
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
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3262
|
+
if (job_promises.length) {
|
|
3263
|
+
await Promise.all(job_promises)
|
|
3264
|
+
}
|
|
3263
3265
|
resolve()
|
|
3264
3266
|
|
|
3265
3267
|
// if (job_promises.length) {
|