job.execution.failed
A job’s device failed. The gateway sends it when the device’s action failed (a step failed or went unanswered), could not be started, or is no longer kept, or when the device is held (its action is then taken back); detail says which. A failed device counts toward the abort threshold, and retry-failed takes it again. Envelope: endpoint and device are the device’s, package is “houradvantage-connect”. Sent once per device and attempt.
Schema id: urn:houradvantage:events:3:job.execution.failed
Fields
| Field | Type | Required | Description |
|---|---|---|---|
job_id | integer | yes | The job’s id (GET /api/tenants/{tenant}/jobs/{id}). |
name | string | The job’s name. Absent when the job was created without one. | |
action | string | yes | The action the device runs: a standard action, or a package action or command. |
state | "queued" \ | "waiting_window" \ | "running" \ |
wave | integer | yes | The device’s wave, counted from 0. at least 0 |
attempt | integer | yes | Which attempt this is: 1, then one more each time retry-failed takes the device again. at least 1 |
action_id | integer | The device’s action for this attempt (its action.result has the same action_id). Absent when no action could be started. | |
detail | string | Why the device failed: the action’s reason (the step it stopped at, counted from 1, and what the device answered), “its action could not be started: |
Example
{ "job_id": 7, "name": "volume", "action": "set_settings", "state": "failed", "wave": 0, "attempt": 1, "action_id": 42, "detail": "step 1 (set_option) failed: the device answered -5"}JSON Schema
job.execution.failed.json
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "urn:houradvantage:events:3:job.execution.failed", "title": "job.execution.failed: data", "description": "A job's device failed. The gateway sends it when the device's action failed (a step failed or went unanswered), could not be started, or is no longer kept, or when the device is held (its action is then taken back); detail says which. A failed device counts toward the abort threshold, and retry-failed takes it again. Envelope: `endpoint` and `device` are the device's, `package` is \"houradvantage-connect\". Sent once per device and attempt.", "type": "object", "properties": { "job_id": { "type": "integer", "description": "The job's id (`GET /api/tenants/{tenant}/jobs/{id}`)." }, "name": { "type": "string", "description": "The job's name. Absent when the job was created without one." }, "action": { "type": "string", "description": "The action the device runs: a standard action, or a package action or command." }, "state": { "enum": [ "queued", "waiting_window", "running", "succeeded", "failed", "timed_out", "cancelled" ], "description": "Where the device stands in the job. In this event: always failed." }, "wave": { "type": "integer", "minimum": 0, "description": "The device's wave, counted from 0." }, "attempt": { "type": "integer", "minimum": 1, "description": "Which attempt this is: 1, then one more each time retry-failed takes the device again." }, "action_id": { "type": "integer", "description": "The device's action for this attempt (its action.result has the same action_id). Absent when no action could be started." }, "detail": { "type": "string", "description": "Why the device failed: the action's reason (the step it stopped at, counted from 1, and what the device answered), \"its action could not be started: <error>\", \"its action <id> is no longer kept\", or \"the device is held: <why>\"." } }, "required": [ "job_id", "action", "state", "wave", "attempt" ], "examples": [ { "job_id": 7, "name": "volume", "action": "set_settings", "state": "failed", "wave": 0, "attempt": 1, "action_id": 42, "detail": "step 1 (set_option) failed: the device answered -5" } ]}