API Layer
Provides the public interface for declaring tasks, enqueuing them, and managing results and schedules.
Dashed nodes are interfaces outside this module.
entryTask DeclarationAllows developers to define tasks using the @huey.task() or @huey.periodic_task() decorators, capturing retry and scheduling parameters.
Input
Function to be decoratedRetry parametersSchedule validation functionOutput
TaskWrapper instanceSource evidence
huey/api.py:192-215No prompt evidence is directly associated with this node.
stageEnqueue TaskSerializes a task into a message and pushes it onto the queue via the storage backend.
Input
TaskWrapper instanceArguments and keyword argumentsOutput
Serialized message in queueSource evidence
huey/api.py:307-335No prompt evidence is directly associated with this node.
stageDequeue TaskRetrieves a serialized message from the queue and deserializes it back into a task object.
Input
Queued messageOutput
Task objectSource evidence
huey/api.py:383-386No prompt evidence is directly associated with this node.
stageExecute TaskRuns the task's function, handling pre/post execute hooks, retries, and result storage.
Input
Task objectOutput
Result or exceptionSource evidence
huey/api.py:424-571No prompt evidence is directly associated with this node.
decisionRetry DecisionDetermines whether a failed task should be retried based on retry count and delay parameters.
Input
ExceptionTask retry metadataOutput
Retry or failure resultSource evidence
huey/api.py:602-617No prompt evidence is directly associated with this node.
stageGet ResultRetrieves a task's result from the result store, optionally blocking until it is available.
Input
Task IDOutput
Result valueSource evidence
huey/api.py:1315-1321No prompt evidence is directly associated with this node.
outputResult OutputRepresents the final result of a task execution that is returned to the caller.
Input
Result valueOutput
Final resultSource evidence
huey/api.py:1315-1321No prompt evidence is directly associated with this node.