Skip to content

set_exit

faststream.cli.supervisors.utils.set_exit #

set_exit(
    func: Callable[[int, Optional[FrameType]], Any]
) -> None

Set exit handler for signals.

PARAMETER DESCRIPTION
func

A callable object that takes an integer and an optional frame type as arguments and returns any value.

TYPE: Callable[[int, Optional[FrameType]], Any]

RETURNS DESCRIPTION
None

None

Note

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

Source code in faststream/cli/supervisors/utils.py
def set_exit(func: Callable[[int, Optional[FrameType]], Any]) -> None:
    """Set exit handler for signals.

    Args:
        func: A callable object that takes an integer and an optional frame type as arguments and returns any value.

    Returns:
        None
    !!! note

        The above docstring is autogenerated by docstring-gen library (https://docstring-gen.airt.ai)
    """
    for sig in HANDLED_SIGNALS:
        signal.signal(sig, func)

Last update: 2023-11-13