Files
mostlymatter/app
Agniva De Sarker 346fab1620 MM-50393: Revamp email batching performance (#22358)
This ticket does a number of improvements to the email
batching code in general.

- Fix unbounded goroutines: We now send mails using a single
goroutine only. Since anyways the processing is asynchronous,
performance should not matter.
- Move the exit condition earlier: We have moved up the check
for the per-user email interval preference. This prevents
unnecessary DB calls from happening.
- Break from the loop properly: The objective was to not
send notifications if a user has viewed any channel since
a notification was queued. But there were 2 nested for loops
and we were breaking from just one and not the other. That is
correctly fixed now to prevent unnecessary DB calls.
- Gracefully shutdown the job: The batching task wasn't
properly shut down and could have notifications in-flight
which would have not got sent. We fix that now by cancelling
the task and waiting for it to finish.

https://mattermost.atlassian.net/browse/MM-50393
2023-03-08 08:42:21 +05:30
..
2023-02-14 17:39:10 +07:00
2023-02-14 17:39:10 +07:00
2023-02-14 17:39:10 +07:00
2022-08-18 11:01:37 +02:00
2023-02-14 17:39:10 +07:00
2022-12-29 13:38:38 +04:00
2021-08-17 16:08:04 -04:00
2023-01-20 15:43:05 -06:00
2022-08-18 11:01:37 +02:00
2023-01-06 15:41:06 -05:00