Fix thread cleaner forgetting to clean some thread and messages

This commit is contained in:
Charles Bochet
2024-06-01 16:51:20 +02:00
parent 182ab66eef
commit c4b6b1e076

View File

@ -16,13 +16,12 @@ export const deleteUsingPagination = async (
) => Promise<void>,
transactionManager?: EntityManager,
) => {
let offset = 0;
let hasMoreData = true;
while (hasMoreData) {
const idsToDelete = await getterPaginated(
batchSize,
offset,
0,
workspaceId,
transactionManager,
);
@ -32,7 +31,5 @@ export const deleteUsingPagination = async (
} else {
hasMoreData = false;
}
offset += batchSize;
}
};