Class CrawlSession

java.lang.Object
io.quarkus.hibernate.orm.panache.PanacheEntityBase
ai.pipestream.connector.intake.entity.CrawlSession

@Entity public class CrawlSession extends io.quarkus.hibernate.orm.panache.PanacheEntityBase
Crawl session entity tracking document ingestion sessions.

Each crawl session represents a single ingestion run from a connector. Sessions track statistics, state, and metadata for monitoring and orphan detection.

Database Table: crawl_sessions

  • Field Details

    • id

      public String id
      Unique session identifier (primary key). Generated as UUID.
    • datasourceId

      public String datasourceId
      DataSource ID that started this session. References datasource-admin service (not enforced cross-DB).
    • crawlId

      public String crawlId
      Client-provided crawl ID. Unique per connector.
    • accountId

      public String accountId
      Account ID this connector belongs to. Copied from connector for efficient queries.
    • state

      public String state
      Session state. Values: RUNNING, COMPLETED, FAILED, TERMINATED
    • startedAt

      public OffsetDateTime startedAt
      Timestamp when session started.
    • completedAt

      public OffsetDateTime completedAt
      Timestamp when session completed. Null if session is still running.
    • lastHeartbeat

      public OffsetDateTime lastHeartbeat
      Timestamp of last heartbeat. Used for timeout detection.
    • documentsFound

      public Integer documentsFound
      Number of documents found during crawl.
    • documentsProcessed

      public Integer documentsProcessed
      Number of documents successfully processed.
    • documentsFailed

      public Integer documentsFailed
      Number of documents that failed processing.
    • documentsSkipped

      public Integer documentsSkipped
      Number of documents skipped.
    • bytesProcessed

      public Long bytesProcessed
      Total bytes processed.
    • trackDocuments

      public Boolean trackDocuments
      Whether to track documents for orphan detection.
    • deleteOrphans

      public Boolean deleteOrphans
      Whether to delete orphans at end of crawl.
    • connectorType

      public String connectorType
      Connector type identifier.
    • sourceSystem

      public String sourceSystem
      Source system identifier.
    • metadata

      public String metadata
      Crawl metadata as JSON.
  • Constructor Details

    • CrawlSession

      public CrawlSession()
      Default constructor for JPA.
    • CrawlSession

      public CrawlSession(String id, String datasourceId, String crawlId, String accountId, String state)
      Create a new crawl session.
      Parameters:
      id - Session ID (UUID)
      datasourceId - DataSource ID
      crawlId - Client-provided crawl ID
      accountId - Account ID
      state - Initial state