Skip to content

failover_output_device

messageflux.iodevices.failover_output_device_wrapper.failover_output_device

FailoverOutputDevice

FailoverOutputDevice(
    device_manager,
    inner_device,
    failover_device,
    device_name=None,
)

Bases: OutputDevice['FailoverOutputDeviceManager']

this device tries to send to primary output device - if the primary fails, it sends to secondary

this device tries to send to primary output device - if the primary fails, it sends to secondary

Parameters:

Name Type Description Default
inner_device OutputDevice

the device to wrap

required
failover_device OutputDevice

the failover device to send to in case of primary fail

required
device_name Optional[str]

the name for the device (or None to take from inner_device

None

failover_device property

failover_device

the failover device

Returns:

Type Description

the failover device

inner_device property

inner_device

the inner device

Returns:

Type Description

the inner device

close

close()

closes the underlying devices

FailoverOutputDeviceManager

FailoverOutputDeviceManager(
    inner_device_manager, failover_device_manager, **kwargs
)

Bases: OutputDeviceManager[OutputDevice]

Output Device Manager that uses a failover if the send fails

Parameters:

Name Type Description Default
inner_device_manager OutputDeviceManager

the device to wrap

required
failover_device_manager OutputDeviceManager

the failover device_manager to send to in case of primary fail

required

connect

connect()

connects to device manager

disconnect

disconnect()

closes the connection to IODeviceManager