python - How to extract values from log file simultaneously while a process is running in django view -


to update progress bar, need compute percentage of progress of process running in django view, this; have retrieve values simultaneously log file generated while 1 running can compute percetage equivalent 0/5000, 19/5000... shown in picture. i'm new django , programming in general. how can please in function in django views.py? or if there way javascript solution. thank in advance. log file generated looks this:

enter image description here

you should consider using websockets based co-frameworks make real time notifications user behind browsers. these built such usage.

have try django-channels https://channels.readthedocs.io/en/stable/ or crossbar+autobahn http://crossbar.io/

i made small django + crossbar "real time" polls demo here https://github.com/alterway/wamp-polls


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -