Send Owner email max once per day
What does this MR do and why?
Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/441796. In this MR, we want to make sure that the all seats used email is only sent max once per day. To achieve it, we're adding a new column last_seat_all_used_seats_notification_at
to the namespace_limits
. When the relevant events occur, we'll only send the mail if 1) last_seat_all_used_seats_notification_at
is nil
or 2) if we didn't send one already in the 1 day time frame.
The following is produced from running the specs:
UPDATE "namespace_limits" SET "last_seat_all_used_seats_notification_at" = '2024-05-08 08:40:29.076117' WHERE "namespace_limits"."namespace_id" = 948
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.