@xuda.io/xuda-worker-bundle-min 1.3.363 → 1.3.365
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 +11 -7
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -378,13 +378,17 @@ func.common.db = async function (
|
|
|
378
378
|
const json = await perform_rpi_request(serviceP);
|
|
379
379
|
if (json.opt) {
|
|
380
380
|
try {
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
381
|
+
try {
|
|
382
|
+
await db.get(rep_id);
|
|
383
|
+
} catch (err) {
|
|
384
|
+
await db.put({
|
|
385
|
+
_id: rep_id,
|
|
386
|
+
selector: json.opt.selector,
|
|
387
|
+
stat: 1,
|
|
388
|
+
ts: Date.now(),
|
|
389
|
+
docType: "rep_request",
|
|
390
|
+
});
|
|
391
|
+
}
|
|
388
392
|
func.db.pouch.set_db_replication_from_server(SESSION_ID, rep_id);
|
|
389
393
|
} catch (err) {}
|
|
390
394
|
}
|