emberflow 1.2.3 → 1.2.4
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/lib/utils/batch.d.ts +0 -1
- package/lib/utils/batch.js +1 -6
- package/lib/utils/batch.js.map +1 -1
- package/package.json +1 -1
package/lib/utils/batch.d.ts
CHANGED
package/lib/utils/batch.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BatchUtil = void 0;
|
|
4
4
|
const index_1 = require("../index");
|
|
5
|
-
const misc_1 = require("./misc");
|
|
6
5
|
class BatchUtil {
|
|
7
6
|
constructor() {
|
|
8
7
|
this.BATCH_SIZE = 490;
|
|
@@ -13,16 +12,12 @@ class BatchUtil {
|
|
|
13
12
|
}
|
|
14
13
|
async getBatch() {
|
|
15
14
|
if (!this._batch) {
|
|
16
|
-
|
|
17
|
-
this._batch = index_1.db.batch();
|
|
18
|
-
await (0, misc_1.sleep)(100);
|
|
19
|
-
} while (this._batch === this._oldBatch);
|
|
15
|
+
this._batch = index_1.db.batch();
|
|
20
16
|
}
|
|
21
17
|
return this._batch;
|
|
22
18
|
}
|
|
23
19
|
async commit() {
|
|
24
20
|
await (await this.getBatch()).commit();
|
|
25
|
-
this._oldBatch = this._batch;
|
|
26
21
|
this._batch = undefined;
|
|
27
22
|
this.writeCount = 0;
|
|
28
23
|
}
|
package/lib/utils/batch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/utils/batch.ts"],"names":[],"mappings":";;;AACA,oCAA4B;
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/utils/batch.ts"],"names":[],"mappings":";;;AACA,oCAA4B;AAK5B,MAAa,SAAS;IAKpB;QACE,IAAI,CAAC,UAAU,GAAG,GAAG,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,CAAC,CAA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