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

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.

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.