Skip to content

refactor: getCalendarBusyTimesOfInterval use Promise.allSettled #20590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

joeauyeung
Copy link
Contributor

@joeauyeung joeauyeung commented Apr 7, 2025

What does this PR do?

  • In getCalendarBusyTimesOfInterval instead of using Promise.all we use Promise.allSettled so if one member throws an error it doesn't stop execution for other members

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. If N/A, write N/A here and check the checkbox.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

  • Create calendar busy time for a RR host
  • Book an RR event with that host
  • userBusyTimesOfInterval should have the calendar busy times

@keithwillcode keithwillcode added consumer core area: core, team members only labels Apr 7, 2025
Copy link

vercel bot commented Apr 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
cal ⬜️ Ignored (Inspect) Visit Preview Apr 7, 2025 5:12pm
calcom-web-canary ⬜️ Ignored (Inspect) Visit Preview Apr 7, 2025 5:12pm

userId: user.id,
busyTimes,
}))
.catch((error) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to log each individual promise rejection in order to get identifiable information

@joeauyeung joeauyeung marked this pull request as ready for review April 7, 2025 16:41
@joeauyeung joeauyeung requested a review from a team as a code owner April 7, 2025 16:41
@graphite-app graphite-app bot requested a review from a team April 7, 2025 16:41
@dosubot dosubot bot added the 💻 refactor label Apr 7, 2025
Copy link

graphite-app bot commented Apr 7, 2025

Graphite Automations

"Add consumer team as reviewer" took an action on this PR • (04/07/25)

1 reviewer was added to this PR based on Keith Williams's automation.

Copy link
Contributor

github-actions bot commented Apr 7, 2025

E2E results are ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants