Maintenance
Root fields
Section titled “Root fields”| Field | Type | Description |
|---|---|---|
maintenance staffql only |
Maintenance! |
Maintenance operations and their runs. Admins only. |
Mutations
Section titled “Mutations”| Operation | Returns | Description |
|---|---|---|
startMaintenanceRun staffql onlyinput: MaintenanceRunStartInput! |
MaintenanceRunStartPayload |
Starts a maintenance operation on the worker. On an audience’s endpoint it runs for that audience; on the tenants endpoint it runs for audienceId, or platform-wide without one. requires maintenance:write:* |
Objects
Section titled “Objects”Maintenance
Section titled “Maintenance”Object · staffql only
Maintenance operations an admin can run, and their runs.
| Field | Type | Description |
|---|---|---|
lastScheduledAt staffql only |
ISO8601DateTime |
When the maintenance schedule (hourly) last started a run; null if it never has. requires maintenance:read:* |
operations staffql only |
[MaintenanceOperation!]! |
The maintenance operations an admin can run here. requires maintenance:read:* |
run staffql onlyid: ID! |
MaintenanceRun |
A maintenance run by its ID. requires maintenance:read:* |
runs staffql onlyafter: StringaudienceId: IDbefore: Stringfirst: Intlast: Intoperation: String |
MaintenanceRunConnection! |
Maintenance runs, newest first. requires maintenance:read:* |
MaintenanceOperation
Section titled “MaintenanceOperation”Object · staffql only
A maintenance operation admins can run on the worker. Only these operations run.
| Field | Type | Description |
|---|---|---|
audienceScoped staffql only |
Boolean! |
Whether it runs for one audience at a time. |
description staffql only |
String! |
What it does, in a sentence or two. |
destructive staffql only |
Boolean! |
Whether it changes records in a way running it again won’t undo. Starting one needs confirm: true. |
key staffql only |
String! |
The name startMaintenanceRun takes, e.g. refresh_pages. |
name staffql only |
String! |
Its name in the console. |
nextRunAt staffql only |
ISO8601DateTime |
When the maintenance schedule next runs it across every audience; null when it isn’t scheduled. A time already past means at the next hourly check. |
schedule staffql only |
String |
How often it runs on its own across every audience, e.g. “Daily at 08:00 UTC”; null when it only runs by hand. |
unavailableReason staffql only |
String |
Why it can’t run on this server right now, e.g. missing encryption keys; null when it can. |
MaintenanceRun
Section titled “MaintenanceRun”Object · implements Node · staffql only
One run of a maintenance operation, from the console or a scheduled task, with what it logged.
| Field | Type | Description |
|---|---|---|
active staffql only |
Boolean! |
Whether it is queued or running. |
audience staffql only |
Audience |
The audience it ran for; null when it ran platform-wide. |
createdAt staffql only |
ISO8601DateTime! |
When it was started. |
error staffql only |
String |
Why it failed, if it did. |
finishedAt staffql only |
ISO8601DateTime |
When it finished. |
id staffql only |
ID! |
The ID of the run. |
log staffql only |
String! |
What it has logged so far, keeping the last 256 KB. |
operation staffql only |
MaintenanceOperation! |
The operation it ran. |
source staffql only |
MaintenanceRunSource! |
What started it. |
startedAt staffql only |
ISO8601DateTime |
When the worker picked it up. |
status staffql only |
MaintenanceRunStatus! |
Where it is. |
triggeredByName staffql only |
String |
The admin who started it; null for scheduled runs. |
MaintenanceRunConnection
Section titled “MaintenanceRunConnection”Object · staffql only
The connection type for MaintenanceRun.
| Field | Type | Description |
|---|---|---|
edges staffql only |
[MaintenanceRunEdge] |
A list of edges. |
nodes staffql only |
[MaintenanceRun] |
A list of nodes. |
pageInfo staffql only |
PageInfo! |
Information to aid in pagination. |
totalCount staffql only |
Int! |
How many there are in all, whatever page this is. |
MaintenanceRunEdge
Section titled “MaintenanceRunEdge”Object · staffql only
An edge in a connection.
| Field | Type | Description |
|---|---|---|
cursor staffql only |
String! |
A cursor for use in pagination. |
node staffql only |
MaintenanceRun |
The item at the end of the edge. |
Mutation payloads
Section titled “Mutation payloads”MaintenanceRunStartPayload
Section titled “MaintenanceRunStartPayload”Object · staffql only
Autogenerated return type of MaintenanceRunStart.
| Field | Type | Description |
|---|---|---|
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
maintenanceRun staffql only |
MaintenanceRun! |
The run, queued (or failed, if the worker queue refused it). |
Inputs
Section titled “Inputs”MaintenanceRunStartInput
Section titled “MaintenanceRunStartInput”Input · staffql only
Autogenerated input type of MaintenanceRunStart
| Field | Type | Description |
|---|---|---|
audienceId staffql only |
ID |
The audience to run it for (tenants endpoint). |
clientMutationId staffql only |
String |
A unique identifier for the client performing the mutation. |
confirm staffql only |
Boolean |
Required for destructive operations. |
operation staffql only |
String! |
The operation’s key, e.g. refresh_pages. |
MaintenanceRunSource
Section titled “MaintenanceRunSource”Enum · staffql only
What started a maintenance run.
CONSOLEAn admin, from the console.RAKEA scheduled task.SCHEDULEThe maintenance schedule.
MaintenanceRunStatus
Section titled “MaintenanceRunStatus”Enum · staffql only
Where a maintenance run is.
FAILEDStopped with an error, or never reached the worker.QUEUEDWaiting for the worker.RUNNINGRunning on the worker.SUCCEEDEDFinished.