Skip to content
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

Open
sterlingbaldwin opened this issue Aug 4, 2016 · 5 comments
Open

Display percent completion during run #173

sterlingbaldwin opened this issue Aug 4, 2016 · 5 comments
Assignees

Comments

@sterlingbaldwin
Copy link
Contributor

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.

@chaosphere2112
Copy link
Contributor

@sterlingbaldwin Server sent events! https://github.com/niwinz/django-sse

@sterlingbaldwin
Copy link
Contributor Author

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.

@chaosphere2112
Copy link
Contributor

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 😉

@sterlingbaldwin
Copy link
Contributor Author

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.

@chaosphere2112
Copy link
Contributor

chaosphere2112 commented Aug 4, 2016

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants