• 
      

    Differentiate between servers, workers, and scripts during initialization.

    Review Request #15246 — Created Aug. 20, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-9.x

    Reviewers

    Review Board's gaining worker support, and already differs when run
    backed by a web server or via a script, but until now we've had no way
    of telling what mode Review Board is in.

    This change adds a process_mode= argument to initialize() for
    specifying a mode. This default to default, which is used for scripts
    or other operations, but can be put into server or worker mode.

    Right now, there's no difference between the modes, but going forward
    we'll be able to alter setup or key off some functionality based on the
    mode. For example, servers will be able to launch workers, but scripts
    and workers will not.

    The current mode is available via
    reviewboard.process.get_rb_process_mode() and via the
    $RB_PROCESS_MODE environment variable.

    There's a bit of cleanup in the initialization while here to avoid
    redundant or unnecessary calls. Some of this may be updated based on the
    process mode in a later change.

    All unit tests pass.

    Ran locally and saw that Review Board was initialized in server mode.

    Commits

    Files