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

Enable long running processes to be interrupted #426

Merged
merged 7 commits into from Sep 8, 2023

Commits on Sep 5, 2023

  1. Configuration menu
    Copy the full SHA
    3d17dd8 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. vspd: Consolidate background task timers.

    Using a single select loop for background tasks removes a lot of
    duplicated boilerplate code and helps to simplify shutdown logic. This
    does reduce the amount of things which can run in parallel, but that
    isn't of concern for vspd. The web server still runs in its own
    goroutine so its responsiveness won't be affected.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    473864e View commit details
    Browse the repository at this point in the history
  2. multi: Rename shutdownCtx to ctx.

    The more verbose name was helpful in the past when some code was
    handling more than one context, however that is no longer the case due
    to refactoring so reverting to the more concise name makes sense.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    e3557ec View commit details
    Browse the repository at this point in the history
  3. vspd: Exit if shutdown requested during startup.

    vspd runs some tasks on startup - database consistency checks, catching
    up with missed blocks, etc. If a shutdown is requested while these tasks
    are running, vspd should stop immediately rather than continuing to
    start the web API server and other background tasks.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    fa6bd04 View commit details
    Browse the repository at this point in the history
  4. vspd: Enable findSpentTickets interrupting.

    Add a Context parameter to findSpentTickets so it can be canceled when a
    shutdown is requested.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    d78c310 View commit details
    Browse the repository at this point in the history
  5. vspd: Enable blockConnected interrupting.

    Check the status of the Context in blockConnected so it can be canceled
    when a shutdown is requested.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    e4e3c60 View commit details
    Browse the repository at this point in the history
  6. vspd: Enable checkWalletConsistency interrupting.

    Add a Context parameter to checkWalletConsistency so it can be canceled
    when a shutdown is requested.
    jholdstock committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    016c8f2 View commit details
    Browse the repository at this point in the history