mljar / mercury

Convert Jupyter Notebooks to Web Apps

Home Page:https://RunMercury.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Option to prevent page-reload?

kapily opened this issue · comments

I believe Mercury sometimes refreshes the page automatically when it senses the backend changed or for other reasons. Is there an option to disable that?
Use case: sometimes pages take a while to load. What I've noticed is that even after the page loads, sometimes the page attempts to re-load and it takes me back to the loading screen.

Ideally, we can pass in an argument to mr.App(...) to prevent reloads. If you can try to point me to the reloading logic, I can attempt a PR as well.

I tried setting the mode continuous=False in the argument to mr.App(...), but I noticed when I lose network connection, I still get the error:

Network Error
Please check if you have internet connection and server is running. In case of problems, please contact administrator.

The ideal behavior should be to attempt to refresh the page and preserve the page as is.

commented

When running Mercury locally there is automatic reload of web app after notebook file change. Jupyter is doing automatic file save every some time, this can trigger unwanted web app reload.

We can add option to disable reload. Maybe something like:

mercury run --disable-auto-reload

What do you think?

That option would be great!

commented

It will be added in the new release 2.4.0.