I'd like to:
- Send request from the browser to a python CGI script
- This request will start some very long operation
- The browser should check progress of that operation every 3 seconds
How can I do that?
I'd like to:
How can I do that?
On the server side, you should probably look into some background queue / job runner of sorts, otherwise your request will be blocked once the long operation starts (depends on your server). I hear Celery is pretty good. On the client side, do some polling every x seconds that checks the job status. If you're feeling adventurous, you could experiment with websockets, although they're not supported natively in all browsers (you could use 3rd party extensions to try and accomplish cross browser support).
You could do this -
But having a server is the way to go... Maybe the long running process stores the progress in a MySQL table.
Hope this helps...