Skip to content

Maintenance

Field Type Description
maintenance staffql only Maintenance! Maintenance operations and their runs. Admins only.
Operation Returns Description
startMaintenanceRun staffql only
input: 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:*

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 only
id: ID!
MaintenanceRun A maintenance run by its ID. requires maintenance:read:*
runs staffql only
after: String
audienceId: ID
before: String
first: Int
last: Int
operation: String
MaintenanceRunConnection! Maintenance runs, newest first. requires maintenance:read:*

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.

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.

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.

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.

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).

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.

Enum · staffql only

What started a maintenance run.

  • CONSOLE An admin, from the console.
  • RAKE A scheduled task.
  • SCHEDULE The maintenance schedule.

Enum · staffql only

Where a maintenance run is.

  • FAILED Stopped with an error, or never reached the worker.
  • QUEUED Waiting for the worker.
  • RUNNING Running on the worker.
  • SUCCEEDED Finished.