GoodMemGoodMem
ReferenceAPIgRPC API

Background Job

Background Job service API reference

Messages

ProcessingHistory

Historical information about a background job that processes a domain entity.

FieldTypeDescription
latest_job...oodmem.v1.BackgroundJobSummaryDetails about the most recent job execution.
attempts...oodmem.v1.BackgroundJobAttemptAttempt-level telemetry in reverse-chronological order.

BackgroundJobSummary

Summary of a background job's current execution state.

FieldTypeDescription
job_idint64The numeric identifier of the background job.
job_typestringThe job type (matches bg_job.job_type).
statusgoodmem.v1.BackgroundJobStatusCurrent state of the job.
attemptsint32Number of attempts started so far.
max_attemptsint32Maximum allowed attempts for this job.
run_atgoogle.protobuf.TimestampWhen the job becomes eligible to run again.
lease_untilgoogle.protobuf.TimestampLease expiration if currently running; unset if no active lease.
locked_bystringWorker currently holding the lease, if any.
last_errorstringShort error message from the last failure, if any.
updated_atgoogle.protobuf.TimestampLast time the job row was updated.
failure_stage...mem.v1.DocumentProcessingStageLatest attempt's failure stage for this memory; absent if unknown or unrelated.

BackgroundJobAttempt

Per-attempt telemetry captured while a background job runs.

FieldTypeDescription
attempt_idint64The numeric identifier of the attempt.
job_idint64Owning background job identifier.
started_atgoogle.protobuf.TimestampWhen the attempt started.
finished_atgoogle.protobuf.TimestampWhen the attempt finished, if applicable.
okboolTrue if the attempt succeeded, false if failed, unset if running.
worker_idstringThe worker processing the attempt.
status_messagestringLatest status message reported by the worker.
progress_currentint64The current progress value.
progress_totalint64Total progress target, if known.
progress_unitstringUnit label for progress metrics (e.g., "pages").
progress_updated_atgoogle.protobuf.TimestampWhen progress fields were last updated.
error_messagestringShort error message for failures.
error_stacktracestringCaptured stack trace for failures, possibly truncated.
failure_stage...mem.v1.DocumentProcessingStageFailure stage for this memory; absent if unknown or another memory failed.

Enums

BackgroundJobStatus

Execution state of a background job within the GoodMem job framework.

NameValueDescription
BACKGROUND_JOB_STATUS_UNSPECIFIED0The default value. Invalid on writes.
BACKGROUND_JOB_PENDING1Eligible to run but not yet leased.
BACKGROUND_JOB_RUNNING2Currently running with an active lease.
BACKGROUND_JOB_SUCCEEDED3Finished successfully.
BACKGROUND_JOB_FAILED4Exhausted retries or failed permanently.
BACKGROUND_JOB_CANCELED5Explicitly canceled or expired.

DocumentProcessingStage

Operation in which document processing failed. Captured at the operation boundary, independently of human-readable progress/error messages and retry policy.

NameValueDescription
DOCUMENT_PROCESSING_STAGE_UNSPECIFIED0Unknown; not emitted as a known failure stage.
DOCUMENT_PROCESSING_STAGE_LOADING_MEMORY1Acquire the database connection and load the memory.
DOCUMENT_PROCESSING_STAGE_PREPARING_DOCUMENT2Resolve configuration/embedders and clear prior chunk state.
DOCUMENT_PROCESSING_STAGE_EXTRACTING_CONTENT3Extract content and split it into chunks.
DOCUMENT_PROCESSING_STAGE_STORING_CHUNKS4Persist extracted chunks.
DOCUMENT_PROCESSING_STAGE_GENERATING_EMBEDDINGS5Generate and validate embedding results.
DOCUMENT_PROCESSING_STAGE_STORING_EMBEDDINGS6Persist embeddings and their associated state.
DOCUMENT_PROCESSING_STAGE_GENERATING_PAGE_IMAGES7Render page images; does not change which rendering failures are fatal.
DOCUMENT_PROCESSING_STAGE_STORING_PAGE_IMAGES8Persist page images and their processing state.
DOCUMENT_PROCESSING_STAGE_FINALIZING_MEMORY9Mark memory processing complete.

On this page