Skip to content

EndlessWatcher

faststream.broker.push_back_watcher.EndlessWatcher #

EndlessWatcher(
    max_tries: int = 0, logger: Optional[Logger] = None
)

Bases: BaseWatcher

Initialize the class.

PARAMETER DESCRIPTION
max_tries

Maximum number of tries allowed

TYPE: int DEFAULT: 0

logger

Optional logger object

TYPE: Optional[Logger] DEFAULT: None

RAISES DESCRIPTION
NotImplementedError

If the method is not implemented in the subclass.

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/push_back_watcher.py
def __init__(
    self,
    max_tries: int = 0,
    logger: Optional[Logger] = None,
):
    """Initialize the class.

    Args:
        max_tries: Maximum number of tries allowed
        logger: Optional logger object

    Raises:
        NotImplementedError: If the method is not implemented in the subclass.
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    self.logger = logger
    self.max_tries = max_tries

logger instance-attribute #

logger = logger

max_tries instance-attribute #

max_tries: int = max_tries

add #

add(message_id: str) -> None

Add a message to the list.

PARAMETER DESCRIPTION
message_id

ID of the message to be added

TYPE: str

RETURNS DESCRIPTION
None

None

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/push_back_watcher.py
def add(self, message_id: str) -> None:
    """Add a message to the list.

    Args:
        message_id: ID of the message to be added

    Returns:
        None
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    pass

is_max #

is_max(message_id: str) -> bool

Check if a message is the maximum.

PARAMETER DESCRIPTION
message_id

ID of the message to check

TYPE: str

RETURNS DESCRIPTION
bool

True if the message is the maximum, False otherwise

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/push_back_watcher.py
def is_max(self, message_id: str) -> bool:
    """Check if a message is the maximum.

    Args:
        message_id: ID of the message to check

    Returns:
        True if the message is the maximum, False otherwise
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    return False

remove #

remove(message_id: str) -> None

Remove a message.

PARAMETER DESCRIPTION
message_id

The ID of the message to be removed.

TYPE: str

RETURNS DESCRIPTION
None

None

Note

The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)

Source code in faststream/broker/push_back_watcher.py
def remove(self, message_id: str) -> None:
    """Remove a message.

    Args:
        message_id: The ID of the message to be removed.

    Returns:
        None
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    pass

Last update: 2023-11-13