nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.86k stars 4.01k forks source link

Send invitations asynchronously #46839

Open Toniob opened 2 months ago

Toniob commented 2 months ago

How to use GitHub

Hello. Currently, when you send invitations for a meeting in the Agenda app, the emails are sent when you validate the form. When you have several attendees, and you use an external SMTP server, the emails can take a few seconds to be sent. The users may have the feeling that something is going wrong. Maybe it’ll be better to send those invitation email asynchronously ?

If the synchronous method is to be kept, maybe showing the number of emails already sent, and the total number to send would be a good compromise ? Something like : Sending invitations : 2 / 5 …

ChristophWurst commented 1 month ago

Yes we could consider that. Nextcloud doesn't have an instant background worker queue at the moment and the process model of PHP otherwise doesn't allow for async tasks. What we could do is send the invites in a background job. Ideally these are triggered every 5 minutes when the instance uses cron. But some instances still use the ancient 15 minute interval, or ajax backrgound jobs. Then the invite sending becomes delayed. This may make Nextcloud appear "slow".