mardi 27 mars 2018

Laravel how much or how many things should a queue process

When a certain action is complete in my app I need to do a few things before I return a success to the user.

  1. Send out an email to the user
  2. Send a Notification to the user through Onesignal
  3. Insert a new item in Model1
  4. Delete an item in Model2
  5. Update an item in Model3

And I would like to queue these things and I could ofc make one queue that does all those things but what is the best practise?

I was thinking of making 3 queues.

Queue1 > Send email

Queue2 > Send notification

Queue3 > Do the insert/update/deletes on the 3 tables (total of 3 queries/operations on 3 different tables)

So is there any best practise regarding queues on how much a queue should process?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire