presidium 0.15.27 → 0.15.28
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/DynamoStream.js +3 -2
- package/KinesisStream.js +2 -1
- package/package.json +1 -1
package/DynamoStream.js
CHANGED
|
@@ -144,20 +144,20 @@ DynamoStream.prototype.getRecords = async function* getRecords(
|
|
|
144
144
|
*/
|
|
145
145
|
|
|
146
146
|
}).promise().then(get('ShardIterator'))
|
|
147
|
+
|
|
147
148
|
let records = await this.client.getRecords({
|
|
148
149
|
ShardIterator: startingShardIterator,
|
|
149
150
|
Limit: this.getRecordsLimit
|
|
150
151
|
}).promise()
|
|
151
|
-
|
|
152
152
|
if (records.Records.length > 0) {
|
|
153
153
|
yield* records.Records.map(assign({
|
|
154
154
|
table: always(this.table),
|
|
155
155
|
shardId: always(Shard.ShardId),
|
|
156
156
|
}))
|
|
157
157
|
}
|
|
158
|
+
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
158
159
|
|
|
159
160
|
while (!this.closed && records.NextShardIterator != null) {
|
|
160
|
-
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
161
161
|
records = await this.client.getRecords({
|
|
162
162
|
ShardIterator: records.NextShardIterator,
|
|
163
163
|
Limit: this.getRecordsLimit
|
|
@@ -168,6 +168,7 @@ DynamoStream.prototype.getRecords = async function* getRecords(
|
|
|
168
168
|
shardId: always(Shard.ShardId),
|
|
169
169
|
}))
|
|
170
170
|
}
|
|
171
|
+
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
|
package/KinesisStream.js
CHANGED
|
@@ -175,9 +175,9 @@ KinesisStream.prototype.getRecords = async function* getRecords(Shard) {
|
|
|
175
175
|
if (records.Records.length > 0) {
|
|
176
176
|
yield* records.Records
|
|
177
177
|
}
|
|
178
|
+
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
178
179
|
|
|
179
180
|
while (!this.closed && records.NextShardIterator != null) {
|
|
180
|
-
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
181
181
|
records = await this.kinesis.client.getRecords({
|
|
182
182
|
ShardIterator: records.NextShardIterator,
|
|
183
183
|
Limit: this.getRecordsLimit,
|
|
@@ -185,6 +185,7 @@ KinesisStream.prototype.getRecords = async function* getRecords(Shard) {
|
|
|
185
185
|
if (records.Records.length > 0) {
|
|
186
186
|
yield* records.Records
|
|
187
187
|
}
|
|
188
|
+
await new Promise(resolve => setTimeout(resolve, this.getRecordsInterval))
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
|