Reputation: 303
Inside my Yii 1.1 app i need to send 2 emails after a record is correctly created, but since the email function is slow (i'm using SMTP authentication) the user will have to wait 4-6 seconds every time. I tried using php exec functions, but the script i call doesn't have the Yii framework. Is there a way to just call an action or a mail function without having to wait? The runaction Yii extension doesn't work for me, i tried to use it but the runBackground function is never fired.
Upvotes: 0
Views: 394
Reputation: 2055
Hi I understand your requirement, You know Yii is highly inspired from Ruby on Rails. In Ruby on Rails, there is a Delayed Job
. Fortunately Yii has some extention, for background jobs, Please look in to this,
Hope this helps.
Upvotes: 1
Reputation: 231
Do you have access to a scheduler (like cron
) on the server? Save messages to a queue processed non-interactively every minute.
Upvotes: 0