Skip to content

Commit

Permalink
added limits to clear operations (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
OlehDulebaEpam authored Dec 19, 2023
1 parent 135a21d commit 103c242
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/functions/conversations-clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => {
});
const result = await client.send(getCommand);

const deleteRequests = result.Items.map(item => {
const deleteRequests = result.Items.slice(0, 100).map(item => {
const conversationID = item.id.S;

const deleteItemCommand = new DeleteItemCommand({
Expand Down
2 changes: 1 addition & 1 deletion src/functions/conversations-count.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => {
});
const result = await client.send(getCommand);

let tables: string[] = [];
const tables: string[] = [];
let lastTable;

do {
Expand Down
2 changes: 1 addition & 1 deletion src/functions/groups-clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const handler = async (event: APIGatewayProxyEventV2) => {
});
const result = await client.send(getCommand);

const deleteRequests = result.Items.map(item => {
const deleteRequests = result.Items.slice(0, 100).map(item => {
const groupID = item.id.S;

const deleteItemCommand = new DeleteItemCommand({
Expand Down

0 comments on commit 103c242

Please sign in to comment.