CMDCRAGArcana.Knowledge.IngestionRun (cmdc_rag_arcana v0.5.0)

Copy Markdown View Source

企业知识库导入运行契约。

Oban worker 或其他任务系统应把每次导入、重试、重建索引记录成 run,方便 Phoenix 控制台展示状态、失败原因和审计链路。

Summary

Functions

构建 ingestion run 契约 struct。

Types

status()

@type status() :: :queued | :running | :completed | :failed | :cancelled

t()

@type t() :: %CMDCRAGArcana.Knowledge.IngestionRun{
  attempt: non_neg_integer(),
  document_version_id: String.t(),
  error: String.t() | nil,
  finished_at: String.t() | nil,
  id: String.t() | nil,
  kind: String.t(),
  metadata: map(),
  progress: map(),
  started_at: String.t() | nil,
  status: status(),
  tenant_id: String.t()
}

Functions

new(run)

@spec new(keyword() | map() | t()) :: t()

构建 ingestion run 契约 struct。