@xuda.io/xuda-worker-bundle-min 1.3.362 → 1.3.364
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 +10 -8
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -364,7 +364,6 @@ func.common.db = async function (
|
|
|
364
364
|
// };
|
|
365
365
|
|
|
366
366
|
const perform_rpi_request_from_pouch = async function (serviceP) {
|
|
367
|
-
debugger;
|
|
368
367
|
const db = await func.utils.connect_pouchdb(SESSION_ID);
|
|
369
368
|
const rep_id = JSON.stringify(dataP);
|
|
370
369
|
var ret;
|
|
@@ -379,13 +378,16 @@ func.common.db = async function (
|
|
|
379
378
|
const json = await perform_rpi_request(serviceP);
|
|
380
379
|
if (json.opt) {
|
|
381
380
|
try {
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
381
|
+
try {
|
|
382
|
+
await db.get(rep_id);
|
|
383
|
+
await db.put({
|
|
384
|
+
_id: rep_id,
|
|
385
|
+
selector: json.opt.selector,
|
|
386
|
+
stat: 1,
|
|
387
|
+
ts: Date.now(),
|
|
388
|
+
docType: "rep_request",
|
|
389
|
+
});
|
|
390
|
+
} catch (err) {}
|
|
389
391
|
func.db.pouch.set_db_replication_from_server(SESSION_ID, rep_id);
|
|
390
392
|
} catch (err) {}
|
|
391
393
|
}
|