triangle-utils 1.4.42 → 1.4.44
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/dist/src/UtilsDynamoDB.js +1 -1
- package/dist/src/UtilsMisc.js +1 -1
- package/dist/src/f.js +2 -0
- package/package.json +1 -1
- package/src/UtilsDynamoDB.ts +1 -1
- package/src/UtilsMisc.ts +1 -1
- package/src/f.ts +5 -1
|
@@ -108,7 +108,7 @@ export class UtilsDynamoDB {
|
|
|
108
108
|
const attribute_names = options.attribute_names !== undefined ? options.attribute_names : [];
|
|
109
109
|
const iterators = [];
|
|
110
110
|
for (let i = 0; i < concurrency; i++) {
|
|
111
|
-
if (options.segment !== undefined && i
|
|
111
|
+
if (options.segment !== undefined && i !== options.segment) {
|
|
112
112
|
continue;
|
|
113
113
|
}
|
|
114
114
|
const expression_attribute_names = Object.fromEntries([...Object.keys(filters), ...attribute_names, ...undefined_attribute_names, ...defined_attribute_names]
|
package/dist/src/UtilsMisc.js
CHANGED
|
@@ -28,7 +28,7 @@ export class UtilsMisc {
|
|
|
28
28
|
iterators.push((async () => {
|
|
29
29
|
while (index < inputs.length) {
|
|
30
30
|
index += 1;
|
|
31
|
-
if (print_freq !== undefined && (index % print_freq === 0)) {
|
|
31
|
+
if (print_freq !== undefined && ((index - 1) % print_freq === 0)) {
|
|
32
32
|
console.log(iterator_id + ":" + (index - 1) + "/" + inputs.length);
|
|
33
33
|
}
|
|
34
34
|
await this.safe_run(() => f(inputs[index - 1], iterator_id, index));
|
package/dist/src/f.js
CHANGED
|
@@ -15,3 +15,5 @@ const config = {
|
|
|
15
15
|
const utils = new TriangleUtils(config);
|
|
16
16
|
// const foods = await utils.dynamodb.query("triage_docket_documents:register_document_id", { register_document_id : "E6-17065" })
|
|
17
17
|
// console.log(foods)
|
|
18
|
+
const federal_donations = await utils.dynamodb.scan("elections.federal_donations", { concurrency: 100000, segment: 0, attribute_names: ["federal_donation_id", "file_number", "fec_file_id"] });
|
|
19
|
+
console.log(federal_donations.length);
|
package/package.json
CHANGED
package/src/UtilsDynamoDB.ts
CHANGED
|
@@ -125,7 +125,7 @@ export class UtilsDynamoDB {
|
|
|
125
125
|
const attribute_names : string[] = options.attribute_names !== undefined ? options.attribute_names : []
|
|
126
126
|
const iterators = []
|
|
127
127
|
for (let i = 0; i < concurrency; i++) {
|
|
128
|
-
if (options.segment !== undefined && i
|
|
128
|
+
if (options.segment !== undefined && i !== options.segment) {
|
|
129
129
|
continue
|
|
130
130
|
}
|
|
131
131
|
const expression_attribute_names = Object.fromEntries(
|
package/src/UtilsMisc.ts
CHANGED
|
@@ -38,7 +38,7 @@ export class UtilsMisc {
|
|
|
38
38
|
iterators.push((async () => {
|
|
39
39
|
while (index < inputs.length) {
|
|
40
40
|
index += 1
|
|
41
|
-
if (print_freq !== undefined && (index % print_freq === 0)) {
|
|
41
|
+
if (print_freq !== undefined && ((index - 1) % print_freq === 0)) {
|
|
42
42
|
console.log(iterator_id + ":" + (index - 1) + "/" + inputs.length)
|
|
43
43
|
}
|
|
44
44
|
await this.safe_run(() => f(inputs[index - 1], iterator_id, index))
|
package/src/f.ts
CHANGED
|
@@ -22,4 +22,8 @@ const utils = new TriangleUtils(config)
|
|
|
22
22
|
|
|
23
23
|
// const foods = await utils.dynamodb.query("triage_docket_documents:register_document_id", { register_document_id : "E6-17065" })
|
|
24
24
|
|
|
25
|
-
// console.log(foods)
|
|
25
|
+
// console.log(foods)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
const federal_donations = await utils.dynamodb.scan("elections.federal_donations", { concurrency : 100000, segment : 0, attribute_names : ["federal_donation_id", "file_number", "fec_file_id"]})
|
|
29
|
+
console.log(federal_donations.length)
|