@xuda.io/runtime-bundle 1.0.964 → 1.0.966

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.
@@ -27492,35 +27492,35 @@ func.UI.worker.init = async function (SESSION_ID) {
27492
27492
 
27493
27493
  let last_job_in_queue = 0;
27494
27494
  // let run_stat;
27495
- // const job_iterator = async function () {
27496
- // let from_job_num_to_run = last_job_in_queue;
27497
- // last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
27498
-
27499
- // if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
27500
- // // idle
27501
- // this.attempt = 0;
27502
- // if (UI_WORKER_OBJ.jobs.length) {
27503
- // // clearInterval(this._interval);
27504
- // for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
27505
- // // if (val.job_num < from_job_num_to_run) continue;
27506
- // try {
27507
- // if (val.stat) {
27508
- // break;
27509
- // }
27510
-
27511
- // await func.UI.worker.execute(val.SESSION_ID, val);
27512
- // // break;
27513
- // } catch (err) {
27514
- // console.error(err);
27515
- // }
27516
- // }
27517
- // }
27518
- // } else {
27519
- // //busy
27495
+ const job_iterator_old = async function () {
27496
+ let from_job_num_to_run = last_job_in_queue;
27497
+ last_job_in_queue = UI_WORKER_OBJ.num - from_job_num_to_run;
27520
27498
 
27521
- // this.attempt++;
27522
- // }
27523
- // };
27499
+ if (typeof UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === 'undefined' || UI_WORKER_OBJ.stat === null) {
27500
+ // idle
27501
+ this.attempt = 0;
27502
+ if (UI_WORKER_OBJ.jobs.length) {
27503
+ // clearInterval(this._interval);
27504
+ for await (const [key, val] of Object.entries(UI_WORKER_OBJ.jobs)) {
27505
+ // if (val.job_num < from_job_num_to_run) continue;
27506
+ try {
27507
+ if (val.stat) {
27508
+ break;
27509
+ }
27510
+
27511
+ await func.UI.worker.execute(val.SESSION_ID, val);
27512
+ // break;
27513
+ } catch (err) {
27514
+ console.error(err);
27515
+ }
27516
+ }
27517
+ }
27518
+ } else {
27519
+ //busy
27520
+
27521
+ this.attempt++;
27522
+ }
27523
+ };
27524
27524
 
27525
27525
  const job_iterator = async function () {
27526
27526
  let from_job_num_to_run = last_job_in_queue;