@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.
Files changed (2) hide show
  1. package/index.js +10 -8
  2. 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
- await db.put({
383
- _id: rep_id,
384
- selector: json.opt.selector,
385
- stat: 1,
386
- ts: Date.now(),
387
- docType: "rep_request",
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xuda.io/xuda-worker-bundle-min",
3
- "version": "1.3.362",
3
+ "version": "1.3.364",
4
4
  "description": "xuda framework min",
5
5
  "main": "index.js",
6
6
  "scripts": {