web / lib/jobs/handlers/create-schema-version-job
lib/jobs/handlers/create-schema-version-job
Job handler for creating schema versions for both auto-approved and manually-approved schemas.
This job is queued after schema validation (for auto-approved changes) or after manual approval to create the schema version in a separate transaction, avoiding circular dependencies and deadlocks.
Variables
createSchemaVersionJob
constcreateSchemaVersionJob:object
Type Declaration
slug
slug:
"create-schema-version"=JOB_TYPES.CREATE_SCHEMA_VERSION
handler()
handler: (
context) =>Promise<{ output: \{ skipped: boolean; schemaVersionId?: undefined; }; } |{ output: \{ skipped?: undefined; schemaVersionId: number; }; }>
Parameters
context
Returns
Promise<{ output: \{ skipped: boolean; schemaVersionId?: undefined; }; } | { output: \{ skipped?: undefined; schemaVersionId: number; }; }>
Last updated on