Multiple Tasks in Serial Order Python Django Framework
You can run the generation in the background and send the user a notification with download link when it is ready.
I have an android app that consumes Django REST APIs. The app is capturing several parameters and has 50-60 images captured. The data is being sent to the server which then parses JSON, uploads all images to cdn server and inserts that data into PostgreSQL tables depending on some logic. I am generating a PDF report using WK-HTML fetching back the same data. This PDF needs to be sent as response to API call. This entire process is taking time while the user is waiting on the app for PDF file.
One thing I could do is use the JSON to generate PDF but I am not sure if all the images have been uploaded to CDN and can be used in PDF report.
How can I achieve better results? Any guidance will be really appreciated.
TIA.