Skip to content

perf: batch task deletion in cancelNoShowTasksForBooking#29776

Draft
Kadajett wants to merge 1 commit into
calcom:mainfrom
Kadajett:perf/batch-noshow-task-deletion
Draft

perf: batch task deletion in cancelNoShowTasksForBooking#29776
Kadajett wants to merge 1 commit into
calcom:mainfrom
Kadajett:perf/batch-noshow-task-deletion

Conversation

@Kadajett

Copy link
Copy Markdown

When cancelNoShowTasksForBooking is called with a webhook, it issues one prisma.task.deleteMany per booking inside a Promise.all — N queries for N bookings.

A single deleteMany with referenceUid: { in: bookingUids } deletes the same rows in one query.

No behavior change.

Replace one deleteMany per booking with a single deleteMany using an
'in' filter on the booking uids. Same rows deleted, one query instead
of N.
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to Cal.diy, @Kadajett! Thanks for opening this pull request.

A few things to keep in mind:

  • This is Cal.diy, not Cal.com. Cal.diy is a community-driven, fully open-source fork of Cal.com licensed under MIT. Your changes here will be part of Cal.diy — they will not be deployed to the Cal.com production app.
  • Please review our Contributing Guidelines if you haven't already.
  • Make sure your PR title follows the Conventional Commits format.

A maintainer will review your PR soon. Thanks for contributing!

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.

1 participant