-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display percent completion during run #173
Comments
@sterlingbaldwin Server sent events! https://github.com/niwinz/django-sse |
The first thing on the page is: Warning: this package is now unmantained because django is not the optimal platform for persistent connections. I strongly recommend use anything like tornado or asyncio with python3 for this purpose. |
Not going to lie, read that right after I posted this. Which is why I said in the car that you would want to spin up a second process 😉 |
Right now I have the page making a request every five seconds to check if the job is done yet, so I think the lazy solution is to just package the percent completion in there. If I decide to get fancy I can just blend the two completion frames together so it looks nice and smooth to the user. Otherwise Im going all out and implementing a side server to handle websockets with a redis queue or something. |
👍 |
With the new version of metadiags, it will create an output folder with a file for each diagnostic run. If a list of runs is created before starting the run with the --dry-run flag, it should then be possible to create a percent completion progress bar for the user.
The biggest issue here is how to stream the data back to the user. Do I setup websockets? Do I do a poll of the server every couple of seconds, like I am for the queue status? do I just package the percent completion into the queue status return?
Although I would like to use websockets (and I think they;re the 'correct' solution) I think it would be a bit of a pain to get them working just for this one piece.
The text was updated successfully, but these errors were encountered: