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

Start web_ui later to avoid race adding UI routes #1585

Merged
merged 5 commits into from
Oct 9, 2020

Commits on Oct 6, 2020

  1. Start web_ui later to avoid race adding UI routes

    Flask throws an exception `AssertionError: A setup function was called after the first request was handled…` if it serves a request before all the routes are added, creating a race condition. Starting the web UI after firing `init` event avoids this race.
    
    Requires `web_ui.start()` to be called manually when `create_web_ui()` or `WebUI()` are called or instantiated manually.
    Ryan Warner committed Oct 6, 2020
    Configuration menu
    Copy the full SHA
    8d31802 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2020

  1. Start web_ui later to avoid race adding UI routes

    v2
    
    web_ui.start() no longer required to be called. `delayed_start` added as optional parameter to WebUI and `create_web_ui()` that gates starting web UI immediately or after `init` event is fired.
    Ryan Warner committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    d6dff41 View commit details
    Browse the repository at this point in the history
  2. Remove commented line

    Ryan Warner committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    16994a9 View commit details
    Browse the repository at this point in the history
  3. Don't rely on events for starting web UI

    Ryan Warner committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    586674a View commit details
    Browse the repository at this point in the history
  4. Remove unnecessary **kwargs

    Ryan Warner committed Oct 8, 2020
    Configuration menu
    Copy the full SHA
    410cf8b View commit details
    Browse the repository at this point in the history