Monitor Tasks

Learn how to track and manage tasks in your Primus deployment.

Task Monitoring

Tasks represent individual units of work in Primus, such as evaluations, source processing, or model training. You can monitor tasks through both the web dashboard and the command line interface.

Using the Dashboard

The web dashboard provides a visual interface for monitoring tasks:

  1. Navigate to the Tasks section in the dashboard
  2. View active and completed tasks in real-time
  3. Use filters to find specific tasks by type or status
  4. Monitor task progress with visual progress bars
  5. View detailed task information including stages and logs
  6. Track task performance and resource usage

Using the CLI

The Primus CLI provides powerful tools for monitoring tasks directly from your terminal:

# List tasks for an account (shows 10 most recent by default)
primus tasks list --account your-account-key

# Show all tasks instead of just the most recent
primus tasks list --account your-account-key --all

# Filter tasks by status
primus tasks list --account your-account-key --status RUNNING
primus tasks list --account your-account-key --status COMPLETED
primus tasks list --account your-account-key --status FAILED

# Filter tasks by type
primus tasks list --account your-account-key --type evaluation

# Combine filters
primus tasks list --account your-account-key --status RUNNING --type evaluation

# Limit the number of tasks shown
primus tasks list --account your-account-key --limit 5

The CLI output displays comprehensive task information in a well-formatted view:

  • Basic task details (ID, type, status, target, command)
  • Associated IDs (account, scorecard, score)
  • Current stage and worker information
  • Complete timing information (created, started, completed, estimated)
  • Color-coded status indicators (blue for running, green for completed, red for failed)
  • Error messages and details when available
  • Task metadata and output logs

Danger Zone: Task Deletion

⚠️ Warning: Task deletion is a permanent operation. Deleted tasks cannot be recovered. Only use these commands when you are absolutely certain about the deletion.

The CLI provides commands for task deletion with built-in safety measures:

# Delete a specific task by ID
primus tasks delete --account your-account-key --task-id "task-id"

# Delete all failed tasks for an account
primus tasks delete --account your-account-key --status FAILED

# Delete all tasks of a specific type for an account
primus tasks delete --account your-account-key --type evaluation

# Delete ALL tasks for a specific account
primus tasks delete --account your-account-key --all

# Delete ALL tasks across ALL accounts (USE WITH EXTREME CAUTION)
primus tasks delete --all

# Skip confirmation prompt with -y/--yes (USE WITH EXTREME CAUTION)
primus tasks delete --all -y

Safety Features:

  • The --all flag is required for bulk deletion
  • Account scope is clearly indicated in confirmations
  • Confirmation prompt is shown by default (can be skipped with -y)
  • Preview of tasks to be deleted is always shown
  • Associated task stages are automatically cleaned up
  • Progress bar shows deletion status

Before deleting tasks, consider:

  • Are there any dependent operations that might be affected?
  • Do you need to keep the task records for auditing purposes?
  • Have you backed up any important task results?
  • Are you targeting the correct tasks with your filters?
  • If using --all without --account, are you certain you want to delete tasks across ALL accounts?