@uniqueginun Are your tasks required for the response of your request or is it okay if you dispatch a job that handles the tasks asynchronously?
Best solution to a process that takes some time
Hello,
I have a controller method that perform multiple tasks. everything is working fine but one of those tasks takes more time than the others and it slows down the response. so I'm thinking about changing the approach.
the flow of tasks is this:
1- method that perform database insert and return eloquent model
2- another method that insert relationship for that model
3- the task that takes time which is basically calling a stored procedure in oracle database and perform many queries and return unique long integer number
4- update the model by that big number returned from procedure
5- do some file uploading
so what is the best way to do task no #3:
- laravel scheduled cron job
-laravel queues
if they are not the same thing
Please or to participate in this conversation.