I have a job that is triggered based on user interaction. The job takes a CSV file, runs throttled API calls on each record, then inserts ( Model->save() ) records into MySQL. The process is lengthy and can sometimes take in excess of a few days. There should only be ONE csv file being processed at a time. Diving deeper into Laravel, I decided to try out Queue for this as opposed to monitoring the filesystem for new files and maintain my own queue/process management.
I have the Queue working and the Job runs when I issue “php artisan queue:worker”. My job has a few instance variables such $progress and $time_started. What I’d like to be able to do is monitor the status of the job by getting these instance variables within another controller method. Essentially, I want to be able to present the user with a Status Page of the running jobs.
Is this doable using Queue?
I once has a similar kind of problem. I solved it by :
This way, you can link the upload done by the user to queue, track and show the status for the same to the use.
mcraz,
Yea, that was going to be my plan B. I was trying to avoid the extra layer of complexity but it's looking like it may be my only choice.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community