class documentation

class WorkerEntry(object):

Constructor: WorkerEntry(timestamp, workerID, workerName)

View In Hierarchy

Internal class for a worker entry in the priority queue.

Method __init__ Initialize a WorkerEntry.
Method __lt__ Compare two WorkerEntry objects for less-than.
Method __repr__ Return a string representation of the WorkerEntry.
Method __str__ Return a string representation of the WorkerEntry.
Class Variable __slots__ Slots for the class.
Instance Variable timestamp Timestamp of the next execution.
Instance Variable workerID ID of the worker.
Instance Variable workerName Name of the worker.
def __init__(self, timestamp: float, workerID: int, workerName: str):

Initialize a WorkerEntry.

Parameters
timestamp:floatTimestamp of the next execution.
workerID:intID of the worker.
workerName:strName of the worker.
def __lt__(self, other: WorkerEntry) -> bool:

Compare two WorkerEntry objects for less-than.

Parameters
other:WorkerEntryThe other WorkerEntry object to compare with.
Returns
boolTrue if this WorkerEntry is less than the other.
def __repr__(self) -> str:

Return a string representation of the WorkerEntry.

Returns
strA string representation of the WorkerEntry.
def __str__(self) -> str:

Return a string representation of the WorkerEntry.

Returns
strA string representation of the WorkerEntry.
__slots__: tuple[str, ...] =

Slots for the class.

timestamp =

Timestamp of the next execution.

workerID =

ID of the worker.

workerName =

Name of the worker.