Fix thread cleaner forgetting to clean some thread and messages
This commit is contained in:
@ -16,13 +16,12 @@ export const deleteUsingPagination = async (
|
|||||||
) => Promise<void>,
|
) => Promise<void>,
|
||||||
transactionManager?: EntityManager,
|
transactionManager?: EntityManager,
|
||||||
) => {
|
) => {
|
||||||
let offset = 0;
|
|
||||||
let hasMoreData = true;
|
let hasMoreData = true;
|
||||||
|
|
||||||
while (hasMoreData) {
|
while (hasMoreData) {
|
||||||
const idsToDelete = await getterPaginated(
|
const idsToDelete = await getterPaginated(
|
||||||
batchSize,
|
batchSize,
|
||||||
offset,
|
0,
|
||||||
workspaceId,
|
workspaceId,
|
||||||
transactionManager,
|
transactionManager,
|
||||||
);
|
);
|
||||||
@ -32,7 +31,5 @@ export const deleteUsingPagination = async (
|
|||||||
} else {
|
} else {
|
||||||
hasMoreData = false;
|
hasMoreData = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset += batchSize;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user