Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.
ReferenceAPI ReferenceLibraryJobsHandlersSchema Maintenance Job

web


web / lib/jobs/handlers/schema-maintenance-job

lib/jobs/handlers/schema-maintenance-job

Schema Maintenance Job Handler.

This job periodically checks all datasets for stale schemas and regenerates them as needed. It runs on a schedule to keep schemas up-to-date without requiring manual intervention.

Interfaces

SchemaMaintenanceJobInput

Properties

datasetIds?

optional datasetIds: number[]

Optional: specific dataset IDs to check (if omitted, checks all)

forceRegenerate?

optional forceRegenerate: boolean

Optional: force regeneration even if schemas appear fresh

maxDatasets?

optional maxDatasets: number

Optional: maximum datasets to process in one run (default: 100)


SchemaMaintenanceResult

Properties

success

success: boolean

datasetsChecked

datasetsChecked: number

schemasGenerated

schemasGenerated: number

schemasSkipped

schemasSkipped: number

schemasFailed

schemasFailed: number

duration

duration: number

details?

optional details: ProcessingResult[]

Variables

schemaMaintenanceJob

const schemaMaintenanceJob: object

Schema maintenance job handler

Type Declaration

slug

slug: string = "schema-maintenance"

schedule

schedule: object[]

Run daily at 3 AM to check and regenerate stale schemas Cron format: minute hour day month weekday

retries

retries: number = 2

waitUntil

waitUntil: number = 600000

handler()

handler: (context) => Promise<{ output: [SchemaMaintenanceResult](#schemamaintenanceresult); }>

Parameters
context

JobHandlerContext

Returns

Promise<{ output: [SchemaMaintenanceResult](#schemamaintenanceresult); }>

Last updated on