@xuda.io/runtime-bundle 1.0.508 → 1.0.510

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.
@@ -25742,8 +25742,8 @@ func.utils.ws_worker.functions = {
25742
25742
  args.run_atP,
25743
25743
  args.worker_id,
25744
25744
  );
25745
-
25746
- if (show_log) console.log('DATASOURCE EXECUTION DONE ' + ret.dsSessionP + ' ' + _session.DS_GLB[ret.dsSessionP]?.tree_obj?.menuName || '' + ' SESSION_ID: ' + SESSION_ID, APP_OBJ[_session.app_id].app_name);
25745
+ let _ds = _session.DS_GLB[ret.dsSessionP];
25746
+ if (show_log) console.log('DATASOURCE EXECUTION DONE ' + ret.dsSessionP + ' ' + _ds?.tree_obj?.menuName || '' + ' SESSION_ID: ' + SESSION_ID, APP_OBJ[_session.app_id].app_name);
25747
25747
  var obj = func.utils.clean_returned_datasource(SESSION_ID, ret?.dsSessionP);
25748
25748
  obj.dataSourceSessionGlobal = _session.dataSourceSessionGlobal;
25749
25749
 
@@ -25755,6 +25755,7 @@ func.utils.ws_worker.functions = {
25755
25755
  process_pid: params.process_pid,
25756
25756
  service: params.service,
25757
25757
  });
25758
+ _ds.stat = 'idle';
25758
25759
  },
25759
25760
  datasource_delete: function (params, promise_queue_id) {
25760
25761
  var SESSION_ID = params.session_id;
@@ -28401,7 +28402,7 @@ func.datasource.create = async function (
28401
28402
  if (_session.DS_GLB[parentDataSourceNoP]._run_at) run_at = _session.DS_GLB[parentDataSourceNoP].v.run_at;
28402
28403
  }
28403
28404
 
28404
- const done = function (SESSION_ID, dsSessionP, is_serverP) {
28405
+ const done = function (SESSION_ID, dsSessionP, response_returned_from_worker) {
28405
28406
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP];
28406
28407
 
28407
28408
  if (IS_DATASOURCE_REFRESH) {
@@ -28439,7 +28440,8 @@ func.datasource.create = async function (
28439
28440
 
28440
28441
  let interval = setInterval(() => {
28441
28442
  let idle_count = 0;
28442
- for (const _ds of ds_connected) {
28443
+ for (const dsSession of ds_connected) {
28444
+ const _ds = _session.DS_GLB[dsSession];
28443
28445
  if (_ds.stat == 'idle') {
28444
28446
  idle_count++;
28445
28447
  }
@@ -28451,7 +28453,6 @@ func.datasource.create = async function (
28451
28453
  }, 1000);
28452
28454
  };
28453
28455
 
28454
- // _ds.stat = "idle";
28455
28456
  set_stat_idle();
28456
28457
  resolve({
28457
28458
  SESSION_ID,
@@ -28492,7 +28493,7 @@ func.datasource.create = async function (
28492
28493
  );
28493
28494
  return done(SESSION_ID, ret.dsSessionP);
28494
28495
  }
28495
-
28496
+ // vvvv run at worker vvvv
28496
28497
  if (_ds) IS_DATASOURCE_REFRESH = true;
28497
28498
  var data = _.assignIn(
28498
28499
  {