{
  "$id": "https://firefox-ci-tc.services.mozilla.com/schemas/queue/v1/list-workers-response.json#",
  "$schema": "https://firefox-ci-tc.services.mozilla.com/schemas/common/metaschema.json#",
  "additionalProperties": false,
  "description": "Response from a `listWorkers` request.\n",
  "properties": {
    "continuationToken": {
      "description": "Opaque `continuationToken` to be given as query-string option to get the\nnext set of workers in the worker-type.\nThis property is only present if another request is necessary to fetch all\nresults. In practice the next request with a `continuationToken` may not\nreturn additional results, but it can. Thus, you can only be sure to have\nall the results if you've called `listWorkerTypes` with `continuationToken`\nuntil you get a result without a `continuationToken`.\n",
      "title": "Continuation Token",
      "type": "string"
    },
    "workers": {
      "description": "List of workers in this worker-type.\n",
      "items": {
        "additionalProperties": false,
        "properties": {
          "firstClaim": {
            "description": "Date of the first time this worker claimed a task.\n",
            "format": "date-time",
            "title": "First task claimed",
            "type": "string"
          },
          "lastDateActive": {
            "description": "Date of the last time this worker was seen active. Updated each time a worker calls\n`queue.claimWork`, `queue.reclaimTask`, and `queue.declareWorker` for this task queue.\n`lastDateActive` is updated every half hour but may be off by up-to half an hour.\nNonetheless, `lastDateActive` is a good indicator of when the worker was last seen active.\nThis defaults to null in the database, and is set to the current time when the worker\nis first seen.\n",
            "format": "date-time",
            "title": "Worker Last Date Active",
            "type": "string"
          },
          "latestTask": {
            "$ref": "task-run.json#",
            "description": "The most recent claimed task\n",
            "title": "Most Recent Task"
          },
          "quarantineUntil": {
            "description": "Quarantining a worker allows the machine to remain alive but not accept jobs.\nOnce the quarantineUntil time has elapsed, the worker resumes accepting jobs.\nNote that a quarantine can be lifted by setting `quarantineUntil` to the present time (or\nsomewhere in the past).\n",
            "format": "date-time",
            "title": "Worker Quarantine",
            "type": "string"
          },
          "workerGroup": {
            "description": "Identifier for the worker group containing this worker.\n",
            "maxLength": 38,
            "minLength": 1,
            "pattern": "^([a-zA-Z0-9-_]*)$",
            "type": "string"
          },
          "workerId": {
            "description": "Identifier for this worker (unique within this worker group).\n",
            "maxLength": 38,
            "minLength": 1,
            "pattern": "^([a-zA-Z0-9-_]*)$",
            "type": "string"
          }
        },
        "required": [
          "workerGroup",
          "workerId",
          "firstClaim"
        ],
        "title": "Worker",
        "type": "object"
      },
      "title": "Workers from a WorkerType",
      "type": "array",
      "uniqueItems": true
    }
  },
  "required": [
    "workers"
  ],
  "title": "List Workers Response",
  "type": "object"
}