pitr_ha_workflows
Creates, updates, deletes, gets or lists a pitr_ha_workflows resource.
Overview​
| Name | pitr_ha_workflows |
| Type | Resource |
| Id | railway.storage.pitr_ha_workflows |
Fields​
The following fields are returned by SELECT queries:
- get_progress
One PitrHaWorkflowProgress row. Progress of an in-flight or recently completed PITR enable/disable rollout on an HA database cluster.
| Name | Datatype | Description |
|---|---|---|
current_member_service_id | string | |
environment_id | string | |
new_leader_service_id | string | |
project_id | string | |
root_service_id | string | |
workflow_id | string | |
cluster_mutated | boolean | |
completed_at | string | |
direction | string | (DISABLE, ENABLE) |
engine | string | |
error_message | string | |
failed_at_phase | string | (CREATING_BUCKET, DONE, FAILED, PATCHING_DCS, PLANNING, REMOVING_VARIABLES, ROLLING_EX_LEADER, ROLLING_REPLICAS, SWITCHING_OVER, VERIFYING, WRITING_VARIABLES) |
members | array | List of PitrHaWorkflowMemberProgress objects |
phase | string | (CREATING_BUCKET, DONE, FAILED, PATCHING_DCS, PLANNING, REMOVING_VARIABLES, ROLLING_EX_LEADER, ROLLING_REPLICAS, SWITCHING_OVER, VERIFYING, WRITING_VARIABLES) |
started_at | string | |
updated_at | string |
Methods​
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_progress | select | environment_id, root_service_id | One-shot read of the current progress of a PITR enable/disable rollout on an HA database cluster. Use it to rehydrate state on page load, then poll this field for updates. Returns null when no rollout has run recently. Backed by the Railway GraphQL query pitrHaWorkflowProgress. | |
cancel | exec | environment_id, root_service_id | Cancels an in-progress PITR enable/disable rollout on an HA database cluster and resets its progress so the UI re-reads from the live cluster. No-ops when nothing is running. Backed by the Railway GraphQL mutation cancelPitrHaWorkflow. | |
clear_progress | exec | environment_id, root_service_id | Clears the recorded progress of a finished PITR enable/disable rollout so the Backups page starts fresh. A rollout still in progress cannot be cleared. Backed by the Railway GraphQL mutation clearPitrHaWorkflowProgress. |
Parameters​
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
environment_id | string | |
root_service_id | string |
SELECT examples​
- get_progress
One-shot read of the current progress of a PITR enable/disable rollout on an HA database cluster. Use it to rehydrate state on page load, then poll this field for updates. Returns null when no rollout has run recently. Backed by the Railway GraphQL query pitrHaWorkflowProgress.
SELECT
current_member_service_id,
environment_id,
new_leader_service_id,
project_id,
root_service_id,
workflow_id,
cluster_mutated,
completed_at,
direction,
engine,
error_message,
failed_at_phase,
members,
phase,
started_at,
updated_at
FROM railway.storage.pitr_ha_workflows
WHERE environment_id = '{{ environment_id }}' -- required
AND root_service_id = '{{ root_service_id }}' -- required
;
Lifecycle Methods​
- cancel
- clear_progress
Cancels an in-progress PITR enable/disable rollout on an HA database cluster and resets its progress so the UI re-reads from the live cluster. No-ops when nothing is running. Backed by the Railway GraphQL mutation cancelPitrHaWorkflow.
EXEC railway.storage.pitr_ha_workflows.cancel
@environment_id='{{ environment_id }}', --required
@root_service_id='{{ root_service_id }}' --required
;
Clears the recorded progress of a finished PITR enable/disable rollout so the Backups page starts fresh. A rollout still in progress cannot be cleared. Backed by the Railway GraphQL mutation clearPitrHaWorkflowProgress.
EXEC railway.storage.pitr_ha_workflows.clear_progress
@environment_id='{{ environment_id }}', --required
@root_service_id='{{ root_service_id }}' --required
;