Skip to main content

Module jobs

Module jobs 

Source
Expand description

Durable job, schedule, workflow, and admin persistence APIs.

Choose the highest-level API that matches the work. Use enqueue_job for one independent retried unit. Use workflow DAG APIs such as enqueue_workflow_run, WorkflowRunEnqueueBuilder, and WorkflowStepEnqueueBuilder when work has dependencies, fan-out/fan-in, external gates, or workflow-level idempotency.

Avoid manually orchestrating ordinary workflows by polling job state, enqueueing child jobs from handlers, or storing dependency state in payloads.

Structs§

AppendWorkflowStepsInput
AppendWorkflowStepsResult
CompleteExternalWorkflowStepInput
JobCompletionUpdate
JobDefinitionCatalogSyncReport
Summary of definition rows changed by a catalog sync.
JobDefinitionListFilter
JobDefinitionRecord
JobDefinitionUpdate
JobDefinitionUpsert
JobEnqueue
JobEventRecord
JobFailureCompletionOutcome
JobFailureUpdate
JobListFilter
JobLogRecord
JobLogRecordInput
JobMetricsRecord
JobProgressUpdate
JobQueueRecord
JobRuntimeConfigListFilter
JobRuntimeConfigRecord
JobRuntimeConfigUpsert
JobScheduleCatalogSyncEntry
One catalog-owned schedule sync entry.
JobScheduleCatalogSyncReport
Result returned by super::schedules::sync_catalog_job_schedules_tx.
JobScheduleJobTypeReference
Schedule row that blocks a job-definition catalog sync.
JobScheduleRecord
JobScheduleUpsert
Input for creating or updating a cron-backed job schedule.
JobSuccessCompletionOutcome
ReapExpiredLeaseDeferredError
ReapExpiredLeasesDetailedResult
ReapExpiredLeasesResult
ReapedLeaseRecord
ReapedTerminalLeaseRecord
WorkflowRunCountFilter
WorkflowRunDbRecord
WorkflowRunHandle
WorkflowRunListFilter
WorkflowRunResultRecord
WorkflowRunWaitOptions
WorkflowStepDbRecord
WorkflowStepDependencyDbRecord

Enums§

AppendWorkflowStepsOutcome
JobDefinitionCatalogSyncError
Error returned while applying a catalog-owned job-definition sync.
JobDefinitionCatalogSyncMode
Enabled-state handling for additive catalog definition sync.
JobFailureCompletionDisposition
JobPayloadUuidArrayFieldUpdate
JobPayloadUuidArrayFieldUpdateRejection
ReapedLeaseDisposition
WorkflowRunHandleError
WorkflowRunHandleScope

Constants§

DEFAULT_WORKFLOW_RUN_WAIT_TIMEOUT
Default workflow result wait timeout used by WorkflowRunWaitOptions.
JOB_LIST_PAGE_LIMIT_MAX
Maximum page size accepted by public job and workflow list APIs.
JOB_SCHEDULE_MAX_JITTER_SECONDS
Maximum accepted schedule jitter, in seconds.

Functions§

append_workflow_steps
append_workflow_steps_tx
cancel_job
cancel_workflow_run_tx
claim_due_schedules_tx
Claims due schedules for runtime materialization inside an existing transaction.
claim_jobs
claim_jobs_for_types
claim_prestart_jobs
claim_prestart_jobs_for_types
complete_external_workflow_step
complete_external_workflow_step_tx
complete_job_failure
complete_job_failure_with_outcome
complete_job_success
Completes a leased job successfully.
complete_job_success_with_outcome
count_workflow_runs
count_workflow_step_dependencies
count_workflow_steps
deactivate_schedules_absent_from_names_tx
Deactivates enabled schedules whose names are in scope_names but absent from present_names.
enqueue_job
Enqueues a job in its own transaction.
enqueue_job_tx
Enqueues a job and returns the existing job id for an identical keyed retry.
enqueue_workflow_run
Enqueues a workflow run in its own transaction.
enqueue_workflow_run_handle
enqueue_workflow_run_tx
Enqueues a workflow run and returns the existing run for an identical keyed retry.
get_job_by_id
get_job_definition_by_type
get_job_metrics
get_job_payload_by_idempotency_key
get_job_runtime_config_by_type
get_job_schedule_by_name
Loads a schedule by name.
get_latest_job_payload_for_run
get_latest_workflow_run_by_type
get_required_job_runtime_config_by_type
get_workflow_run_by_id
get_workflow_run_by_type_and_idempotency_key
get_workflow_run_by_type_and_idempotency_key_tx
get_workflow_run_id_for_job
heartbeat_job
insert_job_definition_if_missing_tx
insert_job_log
insert_job_runtime_config_if_missing
insert_job_runtime_config_if_missing_tx
list_job_definitions
list_job_events
list_job_logs
list_job_runtime_configs
list_jobs
list_workflow_runs
list_workflow_step_dependencies
list_workflow_step_dependencies_page
list_workflow_step_keys_for_update_tx
list_workflow_steps
list_workflow_steps_page
mark_schedule_fired_tx
Records a successful schedule materialization inside an existing transaction.
prepare_schedule_exact_sync_critical_section_tx
Applies transaction-local bounds and locks job_schedules for exact schedule sync.
reap_expired_leases
reap_expired_leases_with_diagnostics
reap_expired_leases_with_terminal_records
release_unstarted_job_claim
requeue_job
retrieve_workflow_run_handle
set_job_schedule_active
Activates or deactivates a schedule in its own transaction.
set_job_schedule_active_tx
Activates or deactivates a schedule inside an existing transaction.
set_job_schedule_next_fire_at
Moves a schedule’s next fire cursor in its own transaction.
set_job_schedule_next_fire_at_tx
Moves a schedule’s next fire cursor inside an existing transaction.
sync_catalog_job_definitions_exact_tx
sync_catalog_job_definitions_tx
sync_catalog_job_schedules_tx
Upserts catalog-owned schedules inside an existing transaction.
update_job_definition
Updates mutable operator-owned fields on a job definition.
update_job_payload_uuid_array_field
Updates one UUID-array payload field on a direct, unclaimed pending job.
update_job_progress
update_workflow_step_and_pending_job_payload_tx
upsert_job_definition_tx
Creates or updates a job definition inside an existing transaction.
upsert_job_runtime_config
upsert_job_runtime_config_tx
upsert_job_schedule
Creates or updates a cron-backed job schedule in its own transaction.
upsert_job_schedule_tx
Creates or updates a cron-backed job schedule inside an existing transaction.
workflow_run_handle

Type Aliases§

WorkflowRunRecordDeprecated
WorkflowStepRecordDeprecated