PacketStatus
__INLINE_CODE_0__
: The packet has been sent to a worker.__INLINE_CODE_1__
: The packet has been claimed by a worker and is being processed.__INLINE_CODE_2__
: The packet has been returned by the worker, meaning that the status of the task inside has been updated.__INLINE_CODE_3__
: The packet has been archived, meaning that the content of the task inside will not be changed. The task is considered as a dependency.
Packet
- task (Task): The task that is wrapped inside the packet.
- publisher_id (str): The ID of the workforce that published the task.
- assignee_id (Optional[str], optional): The ID of the workforce that is assigned to the task. Would be None if the task is a dependency. Defaults to None.
- status (PacketStatus): The status of the task.
init
repr
TaskChannel
- Hash map (_task_dict) for O(1) task lookup by ID
- Status-based index (_task_by_status) for efficient filtering by status
- Assignee/publisher queues for ordered task processing
init
_update_task_status
_cleanup_task_from_indexes
- task_id (str): The ID of the task to remove from indexes.