Skip to content

Web reports cannot be closed anymore #18

@jjnurminen

Description

@jjnurminen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions