Skip to content

Use larger queries for event invitations

Alex requested to merge 774-refactor-event-sql into master

Closes #774 (closed)

What does this MR do?

When adding event invations for a region, each member is invited with a single SQL query. This changes the gateway to use larger queries and reduce the DB load.

I randomly chose 100 IDs per query, so that the queries become not too large and still reduce the load.

How confident are you it won't break things if deployed?

Works locally and in the test, so I'm quite sure.

How to test

Steps a reviewer can take to verify that this MR does what it says it does e.g.

  1. Checkout branch locally
  2. Login as foodsaver
  3. Create a new event (Region -> Termine -> 'Jetzt neuen Termin einladen'
  4. Make sure that the checkbox to invite the whole region is selected
  5. The number of invited people should match the number of people in the region

Screenshots (if applicable)

Any relevant screenshots if this is a design / frontend change

Checklist

  • added a test, or explain why one is not needed/possible... already a test present.
  • no unrelated changes
  • asked someone for a code review
  • joined #foodsharing-beta channel at https://slackin.yunity.org
  • added an entry to CHANGELOG.md (description, merge request link, username(s))
  • Once your MR has been merged, you are responsible to update the #foodsharing-beta Slack channel about what has been changed here. They will test your work in different browsers, roles or other settings
Edited by Alex

Merge request reports