pyebus.prioritizer module
Message Prioritizer.
- class pyebus.prioritizer.Prioritizer(msgdefs, thresholds, intervals=3)[source]
Bases:
object
Prioritizer which creates recommended message polling priority according to message change interval.
Prio 1 is highest. The number of priorities is defined by the number of thresholds + 1.
- Parameters:
msgdefs (MsgDefs) – Message Definitions
thresholds – Iterable with seconds or
timedelta
between priority levels.
- Keyword Arguments:
intervals – Number of intervals the message update rate need to deviate in a row to get a new prio.
- property thresholds
Tuple of timedelta objects with define the time thresholds for each priority.
- property maxprio
Maximum Prio.
The number of thresholds + 1.