Merge branch 'task/173' into develop
This commit is contained in:
commit
a4f7b021a0
7 changed files with 403 additions and 629 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue