hook.expire-pending-events ​
Fail hook.receive-webhook runs stuck in PENDING_FORWARD past a threshold
Fail hook.receive-webhook runs stuck in PENDING_FORWARD past a threshold.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Linear |
| Library | App-hookredirect |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run id |
older_than_seconds | integer | No | — | Age threshold in seconds (default 3600) |
redirect_uuid | string | No | — | Restrict expiration to a specific redirect UUID |
organization_uuid | uuid | No | — | Restrict expiration to a specific organization |
max_batch | integer | No | — | Maximum number of runs to expire per invocation |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
workflow_run_id | string | No | — | DAG-stamped parent run id |
older_than_seconds | integer | No | — | Age threshold in seconds (default 3600) |
redirect_uuid | string | No | — | Restrict expiration to a specific redirect UUID |
organization_uuid | uuid | No | — | Restrict expiration to a specific organization |
max_batch | integer | No | — | Maximum number of runs to expire per invocation |
stale_workflow_uuids | list | No | — | — |
failed_count | integer | No | — | — |
skipped_count | integer | No | — | — |
failure_reason | string | No | — | — |
failed_step | json | No | — | — |
failed_layer | json | No | — | — |
failed_at_state | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
error_message | string | No | — | — |
success | boolean | No | — | — |
failed_at | string | No | — | — |
failure_type | string | No | — | — |
retried_from | string | No | — | — |
retry_count | integer | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
scanning | Yes | No | — | scan | — |
failing_stale | No | No | — | fail_stale | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
scanning | scan | failing_stale | — |
failing_stale | fail_stale | completed | — |
* (any state) | fail | failed | — |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "hook.expire-pending-events",
"initial_data": {
"workflow_run_id": "value",
"older_than_seconds": 123,
"redirect_uuid": "value",
"organization_uuid": "value"
}
}