Skip to content

common

messageflux.iodevices.short_circuit_device_wrapper.common

ShortCircuitDeviceBase

ShortCircuitDeviceBase(
    short_circuit_fail_count, short_circuit_time
)

a base logic for short circuit devices

Parameters:

Name Type Description Default
short_circuit_fail_count int

the consecutive number of failures that will trigger a short circuit

required
short_circuit_time float

the time in seconds that the device will be in short circuit state

required

consecutive_failures_count property

consecutive_failures_count

returns the current consecutive failures count

is_in_short_circuit_state property

is_in_short_circuit_state

returns whether this device is still short circuited.

Returns:

Type Description

True if the device is short-circuited, False otherwise

ShortCircuitException

ShortCircuitException(*args, **kwargs)

Bases: KwargsException

this exception is raised when the device is in short circuit state