@restorecommerce/gql-bot 0.2.1 → 0.2.2
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/CHANGELOG.md +11 -0
- package/lib/job_processor_gql.js +3 -2
- package/package.json +2 -2
- package/src/job_processor_gql.ts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.2.2](https://github.com/restorecommerce/libs/compare/@restorecommerce/gql-bot@0.2.1...@restorecommerce/gql-bot@0.2.2) (2022-06-20)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **gql-bot:** resume if errors are skipped ([7f01a84](https://github.com/restorecommerce/libs/commit/7f01a84f19a81360b94d8dc9421cb572d0fb3cd5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [0.2.1](https://github.com/restorecommerce/libs/compare/@restorecommerce/gql-bot@0.2.0...@restorecommerce/gql-bot@0.2.1) (2022-06-20)
|
|
7
18
|
|
|
8
19
|
|
package/lib/job_processor_gql.js
CHANGED
|
@@ -68,7 +68,7 @@ class GraphQLProcessor {
|
|
|
68
68
|
counter = 0;
|
|
69
69
|
let batchText = '';
|
|
70
70
|
if (batchsize > 0) {
|
|
71
|
-
const from = batchCounter * batchsize;
|
|
71
|
+
const from = batchCounter * batchsize + 1;
|
|
72
72
|
const to = from + (docArr.length - 1);
|
|
73
73
|
batchText = from == to ? ` (${from})` : ` (${from} - ${to})`;
|
|
74
74
|
}
|
|
@@ -94,6 +94,7 @@ class GraphQLProcessor {
|
|
|
94
94
|
}
|
|
95
95
|
catch (e) {
|
|
96
96
|
!ignoreErrors && reject(e);
|
|
97
|
+
ignoreErrors && yamlStream.resume();
|
|
97
98
|
}
|
|
98
99
|
}));
|
|
99
100
|
let runOnResume;
|
|
@@ -113,7 +114,7 @@ class GraphQLProcessor {
|
|
|
113
114
|
if (docArr && !_.isEmpty(docArr)) {
|
|
114
115
|
let batchText = '';
|
|
115
116
|
if (batchsize > 0) {
|
|
116
|
-
const from = batchCounter * batchsize;
|
|
117
|
+
const from = batchCounter * batchsize + 1;
|
|
117
118
|
const to = from + (docArr.length - 1);
|
|
118
119
|
batchText = from == to ? ` (${from})` : ` (${from} - ${to})`;
|
|
119
120
|
}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@restorecommerce/gql-bot",
|
|
3
3
|
"description": "GraphQL Client Automated Task Processor",
|
|
4
4
|
"main": "lib/index",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.2",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/restorecommerce/libs.git"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "a40423a5fca103646c2adbc2530cf096a190139f"
|
|
75
75
|
}
|
package/src/job_processor_gql.ts
CHANGED
|
@@ -64,7 +64,7 @@ export class GraphQLProcessor {
|
|
|
64
64
|
counter = 0;
|
|
65
65
|
let batchText = '';
|
|
66
66
|
if (batchsize > 0) {
|
|
67
|
-
const from = batchCounter * batchsize;
|
|
67
|
+
const from = batchCounter * batchsize + 1;
|
|
68
68
|
const to = from + (docArr.length - 1);
|
|
69
69
|
batchText = from == to ? ` (${from})` : ` (${from} - ${to})`;
|
|
70
70
|
}
|
|
@@ -89,6 +89,7 @@ export class GraphQLProcessor {
|
|
|
89
89
|
yamlStream.resume();
|
|
90
90
|
} catch (e) {
|
|
91
91
|
!ignoreErrors && reject(e);
|
|
92
|
+
ignoreErrors && yamlStream.resume();
|
|
92
93
|
}
|
|
93
94
|
});
|
|
94
95
|
|
|
@@ -111,7 +112,7 @@ export class GraphQLProcessor {
|
|
|
111
112
|
if (docArr && !_.isEmpty(docArr)) {
|
|
112
113
|
let batchText = '';
|
|
113
114
|
if (batchsize > 0) {
|
|
114
|
-
const from = batchCounter * batchsize;
|
|
115
|
+
const from = batchCounter * batchsize + 1;
|
|
115
116
|
const to = from + (docArr.length - 1);
|
|
116
117
|
batchText = from == to ? ` (${from})` : ` (${from} - ${to})`;
|
|
117
118
|
}
|