iNemesis247's avatar

Tasks running in background

I don't know if it makes any sense, but i will give an example so us to make it clear. Let's say i want people that uses my website, to be able to upload gigas of data. Can i catch this event and run it in the background while the user navigates through the website doing other stuff? So far when i upload a 1gb file (using ajax), if i refresh or go to another page the upload is interrupted. I believe it is possible but i need help on what needs to be done.

0 likes
2 replies
ftrillo's avatar

You could use a system of Queues and Jobs. https://laravel.com/docs/5.5/queues

Basically jobs enter a queue. Then a worker runs jobs from the queue one after the other.

Someone can probably point you to a good tutorial or lesson here in laracasts. I haven't watched any on this subject.

I've never had someone upload 1gb of data to my app. Maybe someone else has advice on that, specifically.

Please or to participate in this conversation.