Anvil.Queue (Anvil v0.1.1)
View SourceGenServer that manages a labeling queue.
Handles sample assignment, label submission, and queue state management.
Summary
Functions
Adds labelers to the queue.
Adds samples to the queue.
Returns a specification to start this module under a supervisor.
Gets all assignments for the queue.
Gets all labels for the queue.
Gets the next assignment for a labeler.
Skips an assignment.
Starts an assignment.
Starts a queue process.
Submits a label for an assignment.
Functions
Adds labelers to the queue.
Adds samples to the queue.
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_assignments( pid() | atom(), keyword() ) :: [Anvil.Assignment.t()]
Gets all assignments for the queue.
@spec get_labels( pid() | atom(), keyword() ) :: [Anvil.Label.t()]
Gets all labels for the queue.
@spec get_next_assignment(pid() | atom(), String.t()) :: {:ok, Anvil.Assignment.t()} | {:error, term()}
Gets the next assignment for a labeler.
@spec skip_assignment(pid() | atom(), String.t(), keyword()) :: {:ok, Anvil.Assignment.t()} | {:error, term()}
Skips an assignment.
@spec start_assignment(pid() | atom(), String.t()) :: {:ok, Anvil.Assignment.t()} | {:error, term()}
Starts an assignment.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a queue process.
Submits a label for an assignment.