@xuda.io/runtime-bundle 1.0.1367 → 1.0.1369
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/js/xuda-runtime-bundle.js +35 -36
- package/js/xuda-runtime-bundle.min.js +1 -1
- package/js/xuda-runtime-slim.js +35 -36
- package/js/xuda-runtime-slim.min.es.js +35 -36
- package/js/xuda-runtime-slim.min.js +1 -1
- package/js/xuda-server-bundle.min.mjs +1 -1
- package/js/xuda-server-bundle.mjs +35 -36
- package/js/xuda-worker-bundle.js +35 -36
- package/js/xuda-worker-bundle.min.js +1 -1
- package/package.json +1 -1
|
@@ -31112,44 +31112,43 @@ func.datasource.interval = function (session_id, dsSessionP, typeP) {
|
|
|
31112
31112
|
};
|
|
31113
31113
|
return fx;
|
|
31114
31114
|
};
|
|
31115
|
-
func.datasource.server_cron = function (session_id) {
|
|
31116
|
-
|
|
31117
|
-
|
|
31118
|
-
// var ds = SESSION_OBJ[SESSION_ID].DS_GLB[0];
|
|
31119
|
-
// var v = ds.v;
|
|
31120
|
-
var arr = func.datasource.get_event_interval_arr(SESSION_ID, 0, 'server_cron');
|
|
31121
|
-
const schedule = require('node-schedule');
|
|
31115
|
+
// func.datasource.server_cron = function (session_id) {
|
|
31116
|
+
// var SESSION_ID = session_id;
|
|
31117
|
+
// var jobs = [];
|
|
31122
31118
|
|
|
31123
|
-
|
|
31124
|
-
|
|
31125
|
-
}
|
|
31126
|
-
for (let val of arr) {
|
|
31127
|
-
var event_id = val[0];
|
|
31128
|
-
var cron_prop = val[1];
|
|
31129
|
-
var condition = val[2];
|
|
31130
|
-
|
|
31131
|
-
jobs.push(
|
|
31132
|
-
schedule.scheduleJob(cron_prop, async function () {
|
|
31133
|
-
if (!SESSION_OBJ[SESSION_ID]) return;
|
|
31134
|
-
var event_count = await func.datasource.get_view_events_count(SESSION_ID, 0, 'server_cron', event_id);
|
|
31135
|
-
if (!event_count) {
|
|
31136
|
-
fx.clear();
|
|
31137
|
-
return;
|
|
31138
|
-
}
|
|
31139
|
-
var event_condition = await func.expression.get(SESSION_ID, condition, 0, 'condition'); // execute condition;
|
|
31140
|
-
if (condition && !event_condition.result) return;
|
|
31141
|
-
if (event_count) {
|
|
31142
|
-
const e = await func.datasource.execute_view_events(SESSION_ID, 0, 'server_cron', event_id);
|
|
31143
|
-
// for (const [key, val] of Object.entries(e)) {
|
|
31144
|
-
// val.done = false;
|
|
31145
|
-
// }
|
|
31146
|
-
}
|
|
31147
|
-
}),
|
|
31148
|
-
);
|
|
31149
|
-
}
|
|
31119
|
+
// var arr = func.datasource.get_event_interval_arr(SESSION_ID, 0, 'server_cron');
|
|
31120
|
+
// const schedule = require('node-schedule');
|
|
31150
31121
|
|
|
31151
|
-
|
|
31152
|
-
|
|
31122
|
+
// if (!arr.length) {
|
|
31123
|
+
// return jobs;
|
|
31124
|
+
// }
|
|
31125
|
+
// for (let val of arr) {
|
|
31126
|
+
// var event_id = val[0];
|
|
31127
|
+
// var cron_prop = val[1];
|
|
31128
|
+
// var condition = val[2];
|
|
31129
|
+
|
|
31130
|
+
// jobs.push(
|
|
31131
|
+
// schedule.scheduleJob(cron_prop, async function () {
|
|
31132
|
+
// if (!SESSION_OBJ[SESSION_ID]) return;
|
|
31133
|
+
// var event_count = await func.datasource.get_view_events_count(SESSION_ID, 0, 'server_cron', event_id);
|
|
31134
|
+
// if (!event_count) {
|
|
31135
|
+
// fx.clear();
|
|
31136
|
+
// return;
|
|
31137
|
+
// }
|
|
31138
|
+
// var event_condition = await func.expression.get(SESSION_ID, condition, 0, 'condition'); // execute condition;
|
|
31139
|
+
// if (condition && !event_condition.result) return;
|
|
31140
|
+
// if (event_count) {
|
|
31141
|
+
// const e = await func.datasource.execute_view_events(SESSION_ID, 0, 'server_cron', event_id);
|
|
31142
|
+
// // for (const [key, val] of Object.entries(e)) {
|
|
31143
|
+
// // val.done = false;
|
|
31144
|
+
// // }
|
|
31145
|
+
// }
|
|
31146
|
+
// }),
|
|
31147
|
+
// );
|
|
31148
|
+
// }
|
|
31149
|
+
|
|
31150
|
+
// return jobs;
|
|
31151
|
+
// };
|
|
31153
31152
|
func.datasource.get_viewLoops = async function (SESSION_ID, dataSourceSession, data, batch_source, default_limit) {
|
|
31154
31153
|
var _ds = SESSION_OBJ[SESSION_ID].DS_GLB[dataSourceSession];
|
|
31155
31154
|
var args = _ds.args;
|