@xuda.io/runtime-bundle 1.0.508 → 1.0.509

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.
@@ -1677,7 +1677,7 @@ func.datasource.create = async function (
1677
1677
  if (_session.DS_GLB[parentDataSourceNoP]._run_at) run_at = _session.DS_GLB[parentDataSourceNoP].v.run_at;
1678
1678
  }
1679
1679
 
1680
- const done = function (SESSION_ID, dsSessionP, is_serverP) {
1680
+ const done = function (SESSION_ID, dsSessionP, response_returned_from_worker) {
1681
1681
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP];
1682
1682
 
1683
1683
  if (IS_DATASOURCE_REFRESH) {
@@ -1727,7 +1727,6 @@ func.datasource.create = async function (
1727
1727
  }, 1000);
1728
1728
  };
1729
1729
 
1730
- // _ds.stat = "idle";
1731
1730
  set_stat_idle();
1732
1731
  resolve({
1733
1732
  SESSION_ID,
@@ -1768,7 +1767,7 @@ func.datasource.create = async function (
1768
1767
  );
1769
1768
  return done(SESSION_ID, ret.dsSessionP);
1770
1769
  }
1771
-
1770
+ // vvvv run at worker vvvv
1772
1771
  if (_ds) IS_DATASOURCE_REFRESH = true;
1773
1772
  var data = _.assignIn(
1774
1773
  {
@@ -5173,8 +5172,8 @@ func.utils.ws_worker.functions = {
5173
5172
  args.run_atP,
5174
5173
  args.worker_id,
5175
5174
  );
5176
-
5177
- 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);
5175
+ let _ds = _session.DS_GLB[ret.dsSessionP];
5176
+ 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);
5178
5177
  var obj = func.utils.clean_returned_datasource(SESSION_ID, ret?.dsSessionP);
5179
5178
  obj.dataSourceSessionGlobal = _session.dataSourceSessionGlobal;
5180
5179
 
@@ -5186,6 +5185,7 @@ func.utils.ws_worker.functions = {
5186
5185
  process_pid: params.process_pid,
5187
5186
  service: params.service,
5188
5187
  });
5188
+ _ds.stat = 'idle';
5189
5189
  },
5190
5190
  datasource_delete: function (params, promise_queue_id) {
5191
5191
  var SESSION_ID = params.session_id;
@@ -1677,7 +1677,7 @@ func.datasource.create = async function (
1677
1677
  if (_session.DS_GLB[parentDataSourceNoP]._run_at) run_at = _session.DS_GLB[parentDataSourceNoP].v.run_at;
1678
1678
  }
1679
1679
 
1680
- const done = function (SESSION_ID, dsSessionP, is_serverP) {
1680
+ const done = function (SESSION_ID, dsSessionP, response_returned_from_worker) {
1681
1681
  var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dsSessionP];
1682
1682
 
1683
1683
  if (IS_DATASOURCE_REFRESH) {
@@ -1727,7 +1727,6 @@ func.datasource.create = async function (
1727
1727
  }, 1000);
1728
1728
  };
1729
1729
 
1730
- // _ds.stat = "idle";
1731
1730
  set_stat_idle();
1732
1731
  resolve({
1733
1732
  SESSION_ID,
@@ -1768,7 +1767,7 @@ func.datasource.create = async function (
1768
1767
  );
1769
1768
  return done(SESSION_ID, ret.dsSessionP);
1770
1769
  }
1771
-
1770
+ // vvvv run at worker vvvv
1772
1771
  if (_ds) IS_DATASOURCE_REFRESH = true;
1773
1772
  var data = _.assignIn(
1774
1773
  {
@@ -5173,8 +5172,8 @@ func.utils.ws_worker.functions = {
5173
5172
  args.run_atP,
5174
5173
  args.worker_id,
5175
5174
  );
5176
-
5177
- 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);
5175
+ let _ds = _session.DS_GLB[ret.dsSessionP];
5176
+ 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);
5178
5177
  var obj = func.utils.clean_returned_datasource(SESSION_ID, ret?.dsSessionP);
5179
5178
  obj.dataSourceSessionGlobal = _session.dataSourceSessionGlobal;
5180
5179
 
@@ -5186,6 +5185,7 @@ func.utils.ws_worker.functions = {
5186
5185
  process_pid: params.process_pid,
5187
5186
  service: params.service,
5188
5187
  });
5188
+ _ds.stat = 'idle';
5189
5189
  },
5190
5190
  datasource_delete: function (params, promise_queue_id) {
5191
5191
  var SESSION_ID = params.session_id;