chore: Add High-Load warning for user availability checks with many users (#22369)

This commit is contained in:
Alex van Andel
2025-07-10 01:09:21 +00:00
committed by GitHub
parent 97af2fc0f9
commit 3285b252c2
+6
View File
@@ -699,6 +699,12 @@ type GetUsersAvailabilityProps = {
};
const _getUsersAvailability = async ({ users, query, initialData }: GetUsersAvailabilityProps) => {
if (users.length >= 50) {
const userIds = users.map(({ id }) => id).join(", ");
log.warn(
`High-load warning: Attempting to fetch availability for ${users.length} users. User IDs: [${userIds}], EventTypeId: [${query.eventTypeId}]`
);
}
return await Promise.all(
users.map((user) =>
_getUserAvailability(