Decode kinesis data
parent
7e2216f692
commit
e84194e809
File diff suppressed because one or more lines are too long
|
|
@ -144,8 +144,7 @@ class AWS {
|
|||
iterator = records.NextShardIterator;
|
||||
if (records.Records.length > 0) {
|
||||
for (let index = 0; index < records.Records.length; index++) {
|
||||
const record = records.Records[index].Data;
|
||||
core.info(AWS.ab2str(record));
|
||||
core.info(JSON.stringify(records.Records[index]));
|
||||
}
|
||||
}
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
|
|
@ -170,9 +169,5 @@ class AWS {
|
|||
core.info(`log: ${log}`);
|
||||
});
|
||||
}
|
||||
|
||||
static ab2str(buf) {
|
||||
return String.fromCharCode.apply(undefined, new Uint16Array(buf));
|
||||
}
|
||||
}
|
||||
export default AWS;
|
||||
|
|
|
|||
Loading…
Reference in New Issue