Issue
Ok so I have a Django backend that performs some tasks and one of the queries computes a complex calculation that can take from a couple of seconds up to 15 minutes based on the entered data.
The point is, I have a loop that I can calculate the completion percentage from however I cant figure out how to send an update query saying something like {'completion':20}
every loop iteration.
Frontend is Node hosted on a separate server.
Solution
Requests should come from the client side. Hold the updated completion value in a model in the backend, send an AJAX request from the client side and ask for the latest completion value, get your response and display it.
Answered By - Luke
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.