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

Web reports cannot be closed anymore #18

Open
jjnurminen opened this issue Dec 16, 2024 · 0 comments
Open

Web reports cannot be closed anymore #18

jjnurminen opened this issue Dec 16, 2024 · 0 comments

Comments

@jjnurminen
Copy link
Collaborator

The web report is a Flask app, which eventually runs on localhost using the simple (testing oriented) web server from the werkzeug library. Gaitmenu starts servers in their own threads as reports are opened. Werkzeug used to support shutting down of the server, but not anymore - see pallets/werkzeug#1752

This means that the "close web report" functionality no longer works. As a side effect, it seems that the gaitmenu process does not actually terminate when it's shut down - it seems that the running web server threads prevent the process from shutting down.

One solution could be to run the werkzeug servers in their separate processes, which could be terminated with signals. However at least a straightforward approach using multiprocessing.Process fails due to multiprocessing limitations for passing process data.

Maybe a better solution is to switch to another, more production ready web server - werkzeug is not recommended for production anyway.

Ping @andreyzhd

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

No branches or pull requests

1 participant