Merge branch 'task/173' into develop

This commit is contained in:
mamoss 2025-10-09 23:24:59 +07:00
commit a4f7b021a0
7 changed files with 403 additions and 629 deletions

View file

@ -915,6 +915,7 @@ export class KeycloakController extends Controller {
// keycloak: IsNull(),
isLeave: false,
},
order: { citizenId: "ASC" },
relations: ["roleKeycloaks"],
});
@ -928,12 +929,11 @@ export class KeycloakController extends Controller {
});
// Process แบบ batch เพื่อลดการเรียก API ทีละตัว
const batchSize = 10;
const batchSize = 100;
const batches = [];
for (let i = 0; i < profiles.length; i += batchSize) {
batches.push(profiles.slice(i, i + batchSize));
}
for (const batch of batches) {
await Promise.all(
batch.map(async (_item) => {