Repository navigation
Will asynchronous email sending be supported natively in Chamilo 3.0? #9432
Replies: 1 comment
|
For the update-safe configuration part, 3.0.2 provides an extension point: its Keep the distributed # config/packages/prod/mail_async.yaml
framework:
messenger:
transports:
mail_async:
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
failure_transport: mail_failed
mail_failed: 'doctrine://default?queue_name=mail_failed'
routing:
'Symfony\Component\Mailer\Messenger\SendEmailMessage': mail_asyncSet php bin/console messenger:consume mail_async --env=prod --time-limit=3600Rebuild the production cache and restart workers when deploying configuration/code. The separate Preserve Chamilo's SMTP configuration: its Verify your actual flows in staging with the worker paused, then running, to confirm queuing and References: 3.0.2 Messenger configuration, |
Uh oh!
There was an error while loading. Please reload this page.
Hi everyone,
This question follows up on discussion #9180 (“how to make email sending faster?”). There we learned that config/packages/messenger.yaml has a commented-out when@prod block. That block routes Symfony\Component\Mailer\Messenger\SendEmailMessage to an asynchronous transport (mail_async), and the team added it as an example (commit a0aef26, BT#21613). It is still commented out in 3.0.2.
Today, enabling it means uncommenting that block, setting MESSENGER_TRANSPORT_DSN and keeping a messenger:consume worker running. We’d rather not edit Chamilo’s configuration files, because any update may overwrite those changes, and it takes us away from the standard setup.
Our question: are there plans to make asynchronous sending something you can turn on natively, without changing code or uncommenting lines? For example, through an admin setting or an environment variable, or by making it the default.
In the meantime, what is the recommended way to enable it so that it survives updates? For example, can it be overridden from our own file instead of editing messenger.yaml?
Thanks!
All reactions