<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.
27 lines
949 B
Python
27 lines
949 B
Python
import enum
|
|
from uuid import uuid4
|
|
from datetime import datetime, timezone
|
|
from sqlalchemy import Column, DateTime, JSON, Enum, UUID, String
|
|
from cognee.infrastructure.databases.relational import Base
|
|
|
|
|
|
class PipelineRunStatus(enum.Enum):
|
|
DATASET_PROCESSING_INITIATED = "DATASET_PROCESSING_INITIATED"
|
|
DATASET_PROCESSING_STARTED = "DATASET_PROCESSING_STARTED"
|
|
DATASET_PROCESSING_COMPLETED = "DATASET_PROCESSING_COMPLETED"
|
|
DATASET_PROCESSING_ERRORED = "DATASET_PROCESSING_ERRORED"
|
|
|
|
|
|
class PipelineRun(Base):
|
|
__tablename__ = "pipeline_runs"
|
|
|
|
id = Column(UUID, primary_key=True, default=uuid4)
|
|
|
|
created_at = Column(DateTime(timezone=True), default=lambda: datetime.now(timezone.utc))
|
|
|
|
status = Column(Enum(PipelineRunStatus))
|
|
pipeline_run_id = Column(UUID, index=True)
|
|
pipeline_name = Column(String)
|
|
pipeline_id = Column(UUID, index=True)
|
|
dataset_id = Column(UUID, index=True)
|
|
run_info = Column(JSON)
|