Also, all emails requested to be sent during that time, will be delayed as well. However, I'd like a single task (of a different function) to execute after all the others are done. 100k newsletter subscription list), last user in the queue will receive the message significantly later than the first one. Is there a way to use Drupal Queue API to sequence the execution of tasks, like in a pipeline My use case is pretty simple: I have a number of tasks executing in the background, doesn't matter their order because they are self-contained. If you have a large number of emails to deliver (e.g. In some cases this can result in slower email delivery. It will help you use less resources during each cron run, because you will be able to choose how often will cron of certain modules be run. See Elysia Cron module for fine tuning the cron implementations of all modules on your site. This of course depends on many factors (number of emails you are sending, frequency of your cron, speed at which remote SMTP server processes the requests, number of visitors on your site, complexity, and so on). You might see certain decrease in performance if the site is processing email batches and there are a lot of users online simultaneously. Requires more frequent cron (or a custom script that will process the batches), which translates into more used resources at all times. If the same task is split into multiple batches, it will be easier to process them, and regular visitors will not experience as big decrease in performance. This is better because your server might time out or become unresponsive for visitors if you are trying to send 500 emails at once. Email sending task will be split into batches, and Drupal will process them in smaller chunks during cron runs. Not exactly sure what I was thinking in the middle of last night when I wrote that. Better handling of large volume of emails. updateinitializequeue() is now gone, and Im just creating/destroying the queue at install/upgrade time, which is really the intention of how Queue API should work.TL DR: send the email by queue if you are sending larger number of emails at once, or if your SMTP server takes longer time to process a request (for whatever reason).īelow is a brief overview of the main pros/cons.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |