Skip to main content
Version: 2.5

StatusMessageWatcherSync

Sync variant of StatusMessageWatcher that is logging in thread.

Index

Constructors

__init__

  • __init__(*, run_client, to_logger, check_period): None
  • Initialize StatusMessageWatcherSync.


    Parameters

    • keyword-onlyrun_client: RunClient
    • keyword-onlyto_logger: logging.Logger
    • keyword-onlycheck_period: timedelta = timedelta(seconds=1)

    Returns None

Methods

__enter__

  • __enter__(): Self
  • Start the logging task within the context. Exiting the context will cancel the logging task.


    Returns Self

__exit__

  • __exit__(exc_type, exc_val, exc_tb): None
  • Cancel the logging task.


    Parameters

    • exc_type: type[BaseException] | None
    • exc_val: BaseException | None
    • exc_tb: TracebackType | None

    Returns None

start

  • start(): Thread
  • Start the logging thread. The caller has to handle any cleanup by manually calling the stop method.


    Returns Thread

stop

  • stop(): None
  • Signal the _logging_thread thread to stop logging and wait for it to finish.


    Returns None

Page Options