I have a scenarion.
- My users logged in my project and current status = available
- If users getting task , your status = on working
- My task dispatcher sends jobs to whoever is "available" in the system at that moment.
- I keep users status in mysql
- But sometimes 2 tasks are assigned to the user at the same time.
- Because when the second task starts to be assigned before the status is updated in mysql, that user sees it as "available".
For example;
- task 2021-08-25 is dispatching at 10:00:01.
- task 2021-08-25 is dispatching at 10:00:02.
But same user
How can I handle this situation ? Waiting for your suggestions
Backend : PHP Laravel Database : Mysql
Aucun commentaire:
Enregistrer un commentaire