@instructure/quiz-core 20.20.1-snapshot.19 → 20.20.1-snapshot.21
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.
|
@@ -5,6 +5,8 @@ var ERROR_STATE = 'error';
|
|
|
5
5
|
var WAITING_STATE = 'waiting';
|
|
6
6
|
var SENDING_STATE = 'sending';
|
|
7
7
|
var SENT_STATE = 'sent';
|
|
8
|
+
var REACHED_MAX_FAILURES = 'reached_max_failures';
|
|
9
|
+
var MAX_FAILED_ATTEMPTS = 3;
|
|
8
10
|
var StreamQueue = /*#__PURE__*/function () {
|
|
9
11
|
function StreamQueue(_ref) {
|
|
10
12
|
var config = _ref.config,
|
|
@@ -115,9 +117,13 @@ var StreamQueue = /*#__PURE__*/function () {
|
|
|
115
117
|
_this.kinesis.putRecords(params, function (err, data) {
|
|
116
118
|
if (err) {
|
|
117
119
|
_this.pageQueue[i].status = ERROR_STATE;
|
|
120
|
+
_this.pageQueue[i].errorCount = (_this.pageQueue[i].errorCount || 0) + 1;
|
|
118
121
|
// eslint-disable-next-line no-console
|
|
119
122
|
console.error("KINESIS STREAM ".concat(_this.config.stream, " ERROR: "), err);
|
|
120
|
-
_this.
|
|
123
|
+
if (_this.pageQueue[i].errorCount >= MAX_FAILED_ATTEMPTS) {
|
|
124
|
+
_this.pageQueue[i].status = REACHED_MAX_FAILURES;
|
|
125
|
+
_this._sendRecordsViaProxy(params);
|
|
126
|
+
}
|
|
121
127
|
} else {
|
|
122
128
|
_this.pageQueue[i].status = SENT_STATE;
|
|
123
129
|
// eslint-disable-next-line no-console
|
|
@@ -12,6 +12,8 @@ var ERROR_STATE = 'error';
|
|
|
12
12
|
var WAITING_STATE = 'waiting';
|
|
13
13
|
var SENDING_STATE = 'sending';
|
|
14
14
|
var SENT_STATE = 'sent';
|
|
15
|
+
var REACHED_MAX_FAILURES = 'reached_max_failures';
|
|
16
|
+
var MAX_FAILED_ATTEMPTS = 3;
|
|
15
17
|
var StreamQueue = /*#__PURE__*/function () {
|
|
16
18
|
function StreamQueue(_ref) {
|
|
17
19
|
var config = _ref.config,
|
|
@@ -122,9 +124,13 @@ var StreamQueue = /*#__PURE__*/function () {
|
|
|
122
124
|
_this.kinesis.putRecords(params, function (err, data) {
|
|
123
125
|
if (err) {
|
|
124
126
|
_this.pageQueue[i].status = ERROR_STATE;
|
|
127
|
+
_this.pageQueue[i].errorCount = (_this.pageQueue[i].errorCount || 0) + 1;
|
|
125
128
|
// eslint-disable-next-line no-console
|
|
126
129
|
console.error("KINESIS STREAM ".concat(_this.config.stream, " ERROR: "), err);
|
|
127
|
-
_this.
|
|
130
|
+
if (_this.pageQueue[i].errorCount >= MAX_FAILED_ATTEMPTS) {
|
|
131
|
+
_this.pageQueue[i].status = REACHED_MAX_FAILURES;
|
|
132
|
+
_this._sendRecordsViaProxy(params);
|
|
133
|
+
}
|
|
128
134
|
} else {
|
|
129
135
|
_this.pageQueue[i].status = SENT_STATE;
|
|
130
136
|
// eslint-disable-next-line no-console
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.20.1-snapshot.
|
|
3
|
+
"version": "20.20.1-snapshot.21+0013d4e1c",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@instructure/emotion": "^8.51.0",
|
|
45
45
|
"@instructure/grading-utils": "^1.0.0",
|
|
46
46
|
"@instructure/outcomes-ui": "^3.2.2",
|
|
47
|
-
"@instructure/quiz-common": "20.20.1-snapshot.
|
|
48
|
-
"@instructure/quiz-i18n": "20.20.1-snapshot.
|
|
49
|
-
"@instructure/quiz-interactions": "20.20.1-snapshot.
|
|
50
|
-
"@instructure/quiz-number-input": "20.20.1-snapshot.
|
|
51
|
-
"@instructure/quiz-rce": "20.20.1-snapshot.
|
|
47
|
+
"@instructure/quiz-common": "20.20.1-snapshot.21+0013d4e1c",
|
|
48
|
+
"@instructure/quiz-i18n": "20.20.1-snapshot.21+0013d4e1c",
|
|
49
|
+
"@instructure/quiz-interactions": "20.20.1-snapshot.21+0013d4e1c",
|
|
50
|
+
"@instructure/quiz-number-input": "20.20.1-snapshot.21+0013d4e1c",
|
|
51
|
+
"@instructure/quiz-rce": "20.20.1-snapshot.21+0013d4e1c",
|
|
52
52
|
"@instructure/ui-a11y-content": "^8.51.0",
|
|
53
53
|
"@instructure/ui-alerts": "^8.51.0",
|
|
54
54
|
"@instructure/ui-avatar": "^8.51.0",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"file-saver": "~2.0.5",
|
|
113
113
|
"humps": "^2.0.0",
|
|
114
114
|
"immutable": "^3.8.1",
|
|
115
|
-
"instructure-validations": "20.20.1-snapshot.
|
|
115
|
+
"instructure-validations": "20.20.1-snapshot.21+0013d4e1c",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"isuuid": "^0.1.0",
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
"jquery": "^2.2.3",
|
|
162
162
|
"karma-junit-reporter": "^2.0.1",
|
|
163
163
|
"most-subject": "^5.3.0",
|
|
164
|
-
"quiz-presets": "20.20.1-snapshot.
|
|
164
|
+
"quiz-presets": "20.20.1-snapshot.21+0013d4e1c",
|
|
165
165
|
"react": "^16.8.6",
|
|
166
166
|
"react-addons-test-utils": "^15.6.2",
|
|
167
167
|
"react-dom": "^16.8.6",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"publishConfig": {
|
|
178
178
|
"access": "public"
|
|
179
179
|
},
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "0013d4e1cf870ea14a934ccc40e8ee28d3b138d8"
|
|
181
181
|
}
|