bookclerk_library::entities::jobs
SeaORM entity for the durable daemon jobs table.
| Item | Kind | Summary |
|---|---|---|
Model |
struct | Row shape for this table (DeriveEntityModel). |
ColumnIter |
struct | An iterator over the variants of [Column] |
Entity |
struct | Generated by sea-orm-macros |
PrimaryKeyIter |
struct | An iterator over the variants of [PrimaryKey] |
ActiveModel |
struct | Generated by sea-orm-macros |
RelationIter |
struct | An iterator over the variants of [Relation] |
Column |
enum | Generated by sea-orm-macros |
PrimaryKey |
enum | Generated by sea-orm-macros |
Relation |
enum | Declared SeaORM relations (temp paths are queried by job_id, not modeled). |
pub struct Model {
pub id: String,
pub kind: String,
pub state: String,
pub priority: i64,
pub resource_class: String,
pub payload: String,
pub progress: Option<String>,
pub attempt_count: i64,
pub max_attempts: i64,
pub run_after: String,
pub lease_owner: Option<String>,
pub lease_expires_at: Option<String>,
pub dedup_key: String,
pub error_kind: Option<String>,
pub error_message: Option<String>,
pub cancel_requested: i64,
pub created_at: String,
pub updated_at: String,
pub started_at: Option<String>,
pub finished_at: Option<String>,
pub lease_generation: i64,
}
Row shape for this table (DeriveEntityModel).
Fields
id: Stable job id (scan-{uuid},acquire-{uuid},listen_sync-{uuid}).kind: Job kind (scan,acquire,listen_sync).state: Lifecycle state (pending,running,succeeded,failed,cancelled).priority: Higher values are claimed first when several jobs are ready.resource_class: Concurrency class (network,media,transcription,indexing).payload: JSON payload (account,title,trigger).progress: Human-readable progress string shown in the API and UI.attempt_count: Number of times a worker has claimed this row.max_attempts: Maximum claims before a failure becomes terminal.run_after: RFC 3339 time after which a pending job may be claimed (backoff / delay).lease_owner: Worker id that currently holds the lease, whenstate = running.lease_expires_at: RFC 3339 lease expiry; stale running rows are reclaimed after this.dedup_key: Idempotency key unique among pending/running rows of the same work.error_kind: Structured error kind (queue_fullis admission-only; execution useshandler,cancelled,orphaned_after_restart,max_attempts, andunroutablefrom the requirements sweep).error_message: Operator-facing error text when the job failed or was cancelled.cancel_requested: Cooperative cancel flag (0/1); running workers check between steps.created_at: RFC 3339 timestamp when the row was inserted.updated_at: RFC 3339 timestamp when the row was last modified.started_at: RFC 3339 timestamp when a worker first claimed the row.finished_at: RFC 3339 timestamp when the row reached a terminal state.lease_generation: Per-claim generation used to fence heartbeat and finalization.
pub fn into_ex(self) -> Self
Generated by sea-orm-macros
Implements: Clone, Debug, Eq, From<Model>, FromQueryResult, IntoActiveModel<ActiveModel>, ModelTrait, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct ColumnIter {
/* private fields */
}
An iterator over the variants of Column
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct Entity;
Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Default, EntityName, EntityTrait, Iden, IdenStatic
pub struct PrimaryKeyIter {
/* private fields */
}
An iterator over the variants of PrimaryKey
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub struct ActiveModel {
pub id: ActiveValue<String>,
pub kind: ActiveValue<String>,
pub state: ActiveValue<String>,
pub priority: ActiveValue<i64>,
pub resource_class: ActiveValue<String>,
pub payload: ActiveValue<String>,
pub progress: ActiveValue<Option<String>>,
pub attempt_count: ActiveValue<i64>,
pub max_attempts: ActiveValue<i64>,
pub run_after: ActiveValue<String>,
pub lease_owner: ActiveValue<Option<String>>,
pub lease_expires_at: ActiveValue<Option<String>>,
pub dedup_key: ActiveValue<String>,
pub error_kind: ActiveValue<Option<String>>,
pub error_message: ActiveValue<Option<String>>,
pub cancel_requested: ActiveValue<i64>,
pub created_at: ActiveValue<String>,
pub updated_at: ActiveValue<String>,
pub started_at: ActiveValue<Option<String>>,
pub finished_at: ActiveValue<Option<String>>,
pub lease_generation: ActiveValue<i64>,
}
Generated by sea-orm-macros
Fields
id: Generated by sea-orm-macroskind: Generated by sea-orm-macrosstate: Generated by sea-orm-macrospriority: Generated by sea-orm-macrosresource_class: Generated by sea-orm-macrospayload: Generated by sea-orm-macrosprogress: Generated by sea-orm-macrosattempt_count: Generated by sea-orm-macrosmax_attempts: Generated by sea-orm-macrosrun_after: Generated by sea-orm-macroslease_owner: Generated by sea-orm-macroslease_expires_at: Generated by sea-orm-macrosdedup_key: Generated by sea-orm-macroserror_kind: Generated by sea-orm-macroserror_message: Generated by sea-orm-macroscancel_requested: Generated by sea-orm-macroscreated_at: Generated by sea-orm-macrosupdated_at: Generated by sea-orm-macrosstarted_at: Generated by sea-orm-macrosfinished_at: Generated by sea-orm-macroslease_generation: Generated by sea-orm-macros
Implements: ActiveModelBehavior, ActiveModelTrait, Clone, Debug, Default, From<Model>, IntoActiveModel<ActiveModel>, PartialEq, TryFrom<ActiveModel>, TryIntoModel<Model>
pub struct RelationIter {
/* private fields */
}
An iterator over the variants of Relation
Implements: Clone, Debug, DoubleEndedIterator, ExactSizeIterator, FusedIterator, Iterator
pub enum Column {
Id,
Kind,
State,
Priority,
ResourceClass,
Payload,
Progress,
AttemptCount,
MaxAttempts,
RunAfter,
LeaseOwner,
LeaseExpiresAt,
DedupKey,
ErrorKind,
ErrorMessage,
CancelRequested,
CreatedAt,
UpdatedAt,
StartedAt,
FinishedAt,
LeaseGeneration,
}
Generated by sea-orm-macros
Variants
Id: Generated by sea-orm-macrosKind: Generated by sea-orm-macrosState: Generated by sea-orm-macrosPriority: Generated by sea-orm-macrosResourceClass: Generated by sea-orm-macrosPayload: Generated by sea-orm-macrosProgress: Generated by sea-orm-macrosAttemptCount: Generated by sea-orm-macrosMaxAttempts: Generated by sea-orm-macrosRunAfter: Generated by sea-orm-macrosLeaseOwner: Generated by sea-orm-macrosLeaseExpiresAt: Generated by sea-orm-macrosDedupKey: Generated by sea-orm-macrosErrorKind: Generated by sea-orm-macrosErrorMessage: Generated by sea-orm-macrosCancelRequested: Generated by sea-orm-macrosCreatedAt: Generated by sea-orm-macrosUpdatedAt: Generated by sea-orm-macrosStartedAt: Generated by sea-orm-macrosFinishedAt: Generated by sea-orm-macrosLeaseGeneration: Generated by sea-orm-macros
Implements: Clone, ColumnTrait, Copy, Debug, FromStr, Iden, IdenStatic, IntoEnumIterator
pub enum PrimaryKey {
Id,
}
Generated by sea-orm-macros
Variants
Id: Generated by sea-orm-macros
Implements: Clone, Copy, Debug, Iden, IdenStatic, IntoEnumIterator, PrimaryKeyToColumn, PrimaryKeyTrait
pub enum Relation {}
Declared SeaORM relations (temp paths are queried by job_id, not modeled).
Implements: Clone, Copy, Debug, IntoEnumIterator, RelationTrait
Generated from crates/bookclerk-library at main · View as Markdown