Lux.Company.ExecutionEngine.TaskTracker (Lux v0.5.0)
View SourceTracks and manages concurrent task execution within an objective.
This module is responsible for:
- Tracking multiple concurrent tasks
- Recording agent assignments
- Maintaining task status and progress
- Logging task lifecycle events
Summary
Functions
Assigns a task to an agent.
Returns a specification to start this module under a supervisor.
Marks a task as completed with a result.
Creates a new task for a specific step.
Marks a task as failed with an error reason.
Gets detailed information about a specific task.
Lists all tasks for an agent.
Lists all tasks with their current status.
Starts a new TaskTracker for an objective.
Marks a task as started by an agent.
Types
@type agent_id() :: String.t()
@type task() :: %{ id: task_id(), step: String.t(), assigned_agent: agent_id() | nil, status: task_status(), started_at: DateTime.t() | nil, completed_at: DateTime.t() | nil, error: term() | nil, result: term() | nil, metadata: map() }
@type task_id() :: String.t()
@type task_status() :: :pending | :assigned | :in_progress | :completed | :failed
Functions
Assigns a task to an agent.
Returns a specification to start this module under a supervisor.
See Supervisor
.
Marks a task as completed with a result.
Creates a new task for a specific step.
Marks a task as failed with an error reason.
Gets detailed information about a specific task.
Lists all tasks for an agent.
Lists all tasks with their current status.
Starts a new TaskTracker for an objective.
Options
- :objective_id - The ID of the objective these tasks belong to
- :company_pid - PID of the company process for notifications
Marks a task as started by an agent.