I have a Laravel job that adds a user to the database, sends an email and sms using the twilio service. Everything works when I don't use a queue. However, when I implement database queue, recording user information and email works fine except the twilio sms. It does not fire unless I remove the queue.
Here is job code:
DB::transaction(function() use($data, $mailer, $mailingList, $sms){
$data = $this->insertDataToDB($data);
$data = $this->sendEmailToUser($data, $mailer);
$this->subscribeToMailingList($data, $mailingList);
$sms->send($data);
});
Anyone faced an issue like this?
Thank you for your help
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire