@xuda.io/xuda-worker-bundle-min 1.3.431 → 1.3.432
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 +7 -41
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -313,15 +313,6 @@ func.common.db = async function (
|
|
|
313
313
|
data.req_id = Date.now();
|
|
314
314
|
|
|
315
315
|
const read_dbs_pouch = async function (db) {
|
|
316
|
-
// let _data = _.cloneDeep(dataP);
|
|
317
|
-
|
|
318
|
-
// delete _data.fields;
|
|
319
|
-
// delete _data.viewSourceDesc;
|
|
320
|
-
// delete _data.skip;
|
|
321
|
-
// delete _data.limit;
|
|
322
|
-
// delete _data.count;
|
|
323
|
-
// delete _data.reduce;
|
|
324
|
-
|
|
325
316
|
const rep_id = get_request_id();
|
|
326
317
|
|
|
327
318
|
////// validate existence of whole table request
|
|
@@ -331,38 +322,6 @@ func.common.db = async function (
|
|
|
331
322
|
if (table_req_code > 0) {
|
|
332
323
|
return await func.db.pouch[serviceP](SESSION_ID, data);
|
|
333
324
|
}
|
|
334
|
-
// let table_req_id;
|
|
335
|
-
// try {
|
|
336
|
-
// table_req_id = cleanString({
|
|
337
|
-
// key: data.table_id,
|
|
338
|
-
// table_id: data.table_id,
|
|
339
|
-
// });
|
|
340
|
-
// const doc = await db.get(table_req_id);
|
|
341
|
-
|
|
342
|
-
// let ret = await db.find({
|
|
343
|
-
// selector: {
|
|
344
|
-
// docType: "rep_request",
|
|
345
|
-
// table_id: data.table_id,
|
|
346
|
-
// },
|
|
347
|
-
// });
|
|
348
|
-
// /// delete table refunded requests
|
|
349
|
-
// for (let doc of ret.docs) {
|
|
350
|
-
// if (doc.entire_table) continue;
|
|
351
|
-
// func.db.pouch.remove_db_replication_from_server(SESSION_ID, doc._id);
|
|
352
|
-
// }
|
|
353
|
-
|
|
354
|
-
// if (doc.stat < 3) {
|
|
355
|
-
// return await func.common.perform_rpi_request(
|
|
356
|
-
// SESSION_ID,
|
|
357
|
-
// serviceP,
|
|
358
|
-
// opt,
|
|
359
|
-
// data
|
|
360
|
-
// );
|
|
361
|
-
// }
|
|
362
|
-
// return await func.db.pouch[serviceP](SESSION_ID, data);
|
|
363
|
-
// } catch (err) {}
|
|
364
|
-
|
|
365
|
-
///////////////////////////
|
|
366
325
|
|
|
367
326
|
try {
|
|
368
327
|
const doc = await db.get(rep_id);
|
|
@@ -402,6 +361,10 @@ func.common.db = async function (
|
|
|
402
361
|
const update_dbs_pouch = async function (db) {
|
|
403
362
|
debugger;
|
|
404
363
|
try {
|
|
364
|
+
if (_session.DS_GLB[0].data_system.SYS_GLOBAL_BOL_ONLINE) {
|
|
365
|
+
throw "online";
|
|
366
|
+
}
|
|
367
|
+
|
|
405
368
|
const { code: table_req_code, data: table_req_id } =
|
|
406
369
|
await validate_existence_of_whole_table_request(db);
|
|
407
370
|
|
|
@@ -423,6 +386,9 @@ func.common.db = async function (
|
|
|
423
386
|
const create_dbs_pouch = async function (db) {
|
|
424
387
|
debugger;
|
|
425
388
|
try {
|
|
389
|
+
if (_session.DS_GLB[0].data_system.SYS_GLOBAL_BOL_ONLINE) {
|
|
390
|
+
throw "online";
|
|
391
|
+
}
|
|
426
392
|
const { code: table_req_code, data: table_req_id } =
|
|
427
393
|
await validate_existence_of_whole_table_request(db);
|
|
428
394
|
|