Version: 0.0.4
agrag.common.data_models.cutover_job.CutoverJob
Bases: DataPoint
Crash-recoverable state for one add/update/delete_document call.
Attributes:
- document_key (
str) – The document this job mutates. Unique among non-terminal jobs (enforced by a graph constraint plus lease fencing, not the constraint alone). - verb (
Literal['add', 'update', 'delete_document']) – Which public method created this job. - status (
CutoverJobStatus) – Current phase, see CutoverJobStatus. - affected_entity_ids (
list[UUID]) – The snapshot taken before any pending write began — the only entities the cleanup phase may touch. - lease_token (
UUID) – Current lease holder's fencing token. - lease_expires_at (
datetime) – When the current lease expires.
Functions:
- to_node_record – Return this job as a graph write record.
affected_entity_ids
affected_entity_ids: list[UUID] = Field(default_factory=list)
created_at
created_at: datetime = Field(default_factory=lambda: datetime.now(UTC))
document_key
document_key: str
id
id: UUID
lease_expires_at
lease_expires_at: datetime
lease_token
lease_token: UUID
metadata
metadata: dict[str, Any] = Field(default_factory=dict)
status
status: CutoverJobStatus
to_node_record
to_node_record() -> NodeRecord
Return this job as a graph write record.
verb
verb: Literal['add', 'update', 'delete_document']