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

Ajax to get current status of control panel task #84

Open
charlesreid1 opened this issue Aug 23, 2018 · 0 comments
Open

Ajax to get current status of control panel task #84

charlesreid1 opened this issue Aug 23, 2018 · 0 comments

Comments

@charlesreid1
Copy link
Contributor

A nice-to-have feature.

Description: when the user visits the control panel, there are several re-indexing tasks there that the user can run. Because these indexing tasks can take a while, and because calling a second re-indexing task in the middle of a first re-indexing task will (I think) kill the original re-indexing task, we should have a status indicator next to each task that indicates whether that task is currently running.

This would require the following changes:

Flask would need an additional endpoint to return a small json with current status. The update search index task in centillion.py (an object which wraps the search index task runner) would need some way to stay linked to the app (instead of the app saying, "okay, spin up this process, and then I'll forget about it entirely" it has to be able to say "okay, spin up this process, and then I'll be back in 5 seconds to check in on you and see how things are going").

Javascript on control panel would poll the api endpoint every N seconds, and would extract the contents and use it to update the control panel ui. If task X is currently running, the button to run task X is greyed out and the status indicator indicates that this index is currently being rebuilt.

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

1 participant