@xuda.io/xuda-worker-bundle-min 1.3.431 → 1.3.433
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 -43
- 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);
|
|
@@ -400,8 +359,11 @@ func.common.db = async function (
|
|
|
400
359
|
}
|
|
401
360
|
};
|
|
402
361
|
const update_dbs_pouch = async function (db) {
|
|
403
|
-
debugger;
|
|
404
362
|
try {
|
|
363
|
+
if (_session.DS_GLB[0].data_system.SYS_GLOBAL_BOL_ONLINE) {
|
|
364
|
+
throw "online";
|
|
365
|
+
}
|
|
366
|
+
|
|
405
367
|
const { code: table_req_code, data: table_req_id } =
|
|
406
368
|
await validate_existence_of_whole_table_request(db);
|
|
407
369
|
|
|
@@ -421,8 +383,10 @@ func.common.db = async function (
|
|
|
421
383
|
}
|
|
422
384
|
};
|
|
423
385
|
const create_dbs_pouch = async function (db) {
|
|
424
|
-
debugger;
|
|
425
386
|
try {
|
|
387
|
+
if (_session.DS_GLB[0].data_system.SYS_GLOBAL_BOL_ONLINE) {
|
|
388
|
+
throw "online";
|
|
389
|
+
}
|
|
426
390
|
const { code: table_req_code, data: table_req_id } =
|
|
427
391
|
await validate_existence_of_whole_table_request(db);
|
|
428
392
|
|