1
I have an api made in Laravel 5.6, where requests cannot be executed simultaneously and are queued to be executed in the request order. It’s hard to explain an example, but if anyone can help me I’d like to know how to fix it.
1
I have an api made in Laravel 5.6, where requests cannot be executed simultaneously and are queued to be executed in the request order. It’s hard to explain an example, but if anyone can help me I’d like to know how to fix it.
0
You can use a feature native to Laravel, the Queues. Roughly they serve to record your tasks in a database table and then go forwarding/executing in the background.
Read the documentation and see some examples:https://laravel.com/docs/5.7/queues
For example, queues allow you to postpone processing a time-consuming task, such as sending an email, until a later time. Postponing these time-consuming tasks dramatically speeds up web requests for your application.
So in your case using Queues will go well.
Browser other questions tagged laravel api
You are not signed in. Login or sign up in order to post.
explain what each request does? maybe a request for sequential events
– novic
I think I expressed myself badly, in this case it is a single api route, which can only execute one request at a time due to some limitations of its implementation. You should avoid executing multiple requests for this route simultaneously
– Matheus Silva
I get it, your doubt is interesting, but, (I’m not sure) this is server stuff, because the server that does this ...
– novic
Vishi, there’s no way to do it?
– Matheus Silva
Who requests is the Server, so the control is in it
– novic
This control could be done as?
– Matheus Silva