Skip to main content

StatusMessageWatcherAsync

Async variant of StatusMessageWatcher that is logging in task.

Hierarchy

Index

Methods

__aenter__

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


    Returns Self

__aexit__

  • async __aexit__(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

__init__

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


    Parameters

    • keyword-onlyrun_client: RunClientAsync

      The client for run that will be used to get a status and message.

    • keyword-onlyto_logger: logging.Logger

      The logger to which the status message will be redirected.

    • optionalkeyword-onlycheck_period: timedelta = timedelta(seconds=1)

      The period with which the status message will be polled.

    Returns None

start

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


    Returns Task

stop

  • async stop(): None
  • Stop the logging task.


    Returns None