> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exulu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Job Management

> GraphQL types for background job tracking with BullMQ

## Job

Background job information from BullMQ.

```graphql theme={null}
type Job {
  id: String!
  name: String!
  returnvalue: JSON
  stacktrace: [String]
  finishedOn: Date
  processedOn: Date
  attemptsMade: Int
  failedReason: String
  state: String!
  data: JSON
  timestamp: Date
}
```

## Query Jobs

**By queue and status:**

```graphql theme={null}
query {
  jobs(
    queue: eval_runs
    statusses: [active, waiting, failed]
    page: 1
    limit: 50
  ) {
    items {
      id
      name
      state
      failedReason
    }
  }
}
```

## Job States

* **waiting** - Job is queued
* **active** - Job is currently processing
* **completed** - Job finished successfully
* **failed** - Job failed with error
* **delayed** - Job is scheduled for later
* **paused** - Queue is paused

## Queue Information

Get detailed queue status:

```graphql theme={null}
query {
  queue(queue: eval_runs) {
    name
    concurrency {
      worker
      queue
    }
    timeoutInSeconds
    ratelimit
    isMaxed
    isPaused
    jobs {
      paused
      completed
      failed
      waiting
      active
      delayed
    }
  }
}
```

## Queue Management

Manage queue operations:

```graphql theme={null}
mutation {
  # Pause a queue
  pauseQueue(queue: eval_runs) {
    success
  }

  # Resume a queue
  resumeQueue(queue: eval_runs) {
    success
  }

  # Drain waiting jobs
  drainQueue(queue: eval_runs) {
    success
  }

  # Delete a specific job
  deleteJob(queue: eval_runs, id: "job-123") {
    success
  }
}
```

## Common Queues

* **eval\_runs** - Evaluation execution
* **chunk\_generation** - Vector embedding generation
* **workflow\_execution** - Workflow runs
* **context\_processing** - Context data processing

## Related Types

<CardGroup cols={2}>
  <Card title="Evaluation Types" icon="chart-line" href="/api-reference/core-types/evaluation-types">
    Eval run jobs
  </Card>

  <Card title="Workflow Types" icon="workflow" href="/api-reference/core-types/workflow-types">
    Workflow execution jobs
  </Card>

  <Card title="Dynamic Types" icon="wand-magic-sparkles" href="/api-reference/dynamic-types">
    Context chunk jobs
  </Card>

  <Card title="Back to Overview" icon="arrow-left" href="/api-reference/core-types/overview">
    View all core types
  </Card>
</CardGroup>
