Overview
Job commands provide operational control over extraction jobs. Operators can list jobs with pagination, inspect job details, stop running jobs gracefully, remove individual terminal jobs, bulk-prune terminal jobs by status, and monitor sync progress with block-level detail for each table.Key Concepts
- Job: An extraction task that syncs blockchain data for a dataset, executed by a worker node
- Terminal State: A job that has finished executing (
COMPLETED,STOPPED, orERROR) - Progress: Sync state of a job’s tables, including
current_block,start_block, and file statistics - Pagination: Jobs are listed in pages using
--limit(default: 50) and--after(cursor ID)
Commands
ampctl job list
List extraction jobs with pagination.ls
Maximum number of jobs to return per page
Cursor ID for pagination - get jobs after this ID
Filter jobs by status. Options:
active- Only non-terminal jobs (default)all- All jobs regardless of statusscheduled- Jobs waiting to startrunning- Currently executing jobscompleted- Successfully finished jobsstopped- Manually stopped jobserror- Failed jobs- Multiple statuses:
scheduled,running
ampctl job inspect
Get detailed information about a specific job.get
The unique identifier of the job
ampctl job stop
Stop a running job gracefully.The unique identifier of the job to stop
- Requests graceful termination
- Worker finishes current operations before stopping
- Job transitions to
STOPPEDstate - Use
ampctl job inspectto confirm the job stopped
ampctl job remove
Delete a specific job by ID.rm
The unique identifier of the job to remove
- Only jobs in terminal states can be removed (
COMPLETED,STOPPED,ERROR) - Running jobs must be stopped first using
ampctl job stop
ampctl job prune
Bulk-remove jobs by status filter.Filter which jobs to prune. Options:
- If not specified: All terminal jobs (completed, stopped, error)
completed- Only successfully finished jobsstopped- Only manually stopped jobserror- Only failed jobs
ampctl job progress
Monitor job sync progress with block-level detail.The unique identifier of the job
- Current block number
- Start block number
- Number of files written
- File size statistics
Job Status Values
| Status | Description | Terminal |
|---|---|---|
SCHEDULED | Job is queued and waiting to start | No |
RUNNING | Job is currently executing | No |
COMPLETED | Job finished successfully | Yes |
STOPPED | Job was manually stopped | Yes |
ERROR | Job failed with an error | Yes |