pub struct WorkOrder {Show 15 fields
pub backoff_seconds: i32,
pub claim_timeout_seconds: i32,
pub claimed_at: Option<DateTime<Utc>>,
pub claimed_by: Option<Uuid>,
pub created_at: DateTime<Utc>,
pub id: Uuid,
pub last_error: Option<String>,
pub last_error_at: Option<DateTime<Utc>>,
pub max_retries: i32,
pub next_retry_after: Option<DateTime<Utc>>,
pub retry_count: i32,
pub status: String,
pub updated_at: DateTime<Utc>,
pub work_type: String,
pub yaml_content: String,
}Expand description
Represents an active work order in the queue.
JSON schema
{
"description": "Represents an active work order in the queue.",
"examples": [
{
"backoff_seconds": 60,
"claim_timeout_seconds": 3600,
"claimed_at": null,
"claimed_by": null,
"created_at": "2023-01-01T00:00:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"last_error": null,
"last_error_at": null,
"max_retries": 3,
"next_retry_after": null,
"retry_count": 0,
"status": "PENDING",
"updated_at": "2023-01-01T00:00:00Z",
"work_type": "build",
"yaml_content": "apiVersion: shipwright.io/v1beta1\nkind: Build\n..."
}
],
"type": "object",
"required": [
"backoff_seconds",
"claim_timeout_seconds",
"created_at",
"id",
"max_retries",
"retry_count",
"status",
"updated_at",
"work_type",
"yaml_content"
],
"properties": {
"backoff_seconds": {
"description": "Base backoff seconds for exponential retry calculation.",
"examples": [
60
],
"type": "integer",
"format": "int32"
},
"claim_timeout_seconds": {
"description": "Seconds before a claimed work order is considered stale.",
"examples": [
3600
],
"type": "integer",
"format": "int32"
},
"claimed_at": {
"description": "Timestamp when the work order was claimed.",
"examples": [
"null"
],
"type": [
"string",
"null"
],
"format": "date-time"
},
"claimed_by": {
"description": "ID of the agent that claimed this work order (if any).",
"examples": [
"null"
],
"type": [
"string",
"null"
],
"format": "uuid"
},
"created_at": {
"description": "Timestamp when the work order was created.",
"examples": [
"2023-01-01T00:00:00Z"
],
"type": "string",
"format": "date-time"
},
"id": {
"description": "Unique identifier for the work order.",
"examples": [
"123e4567-e89b-12d3-a456-426614174000"
],
"type": "string",
"format": "uuid"
},
"last_error": {
"description": "Most recent error message from failed execution attempt.",
"examples": [
"null"
],
"type": [
"string",
"null"
]
},
"last_error_at": {
"description": "Timestamp of the most recent failure.",
"examples": [
"null"
],
"type": [
"string",
"null"
],
"format": "date-time"
},
"max_retries": {
"description": "Maximum number of retry attempts.",
"examples": [
3
],
"type": "integer",
"format": "int32"
},
"next_retry_after": {
"description": "Timestamp when RETRY_PENDING work order becomes PENDING again.",
"examples": [
"null"
],
"type": [
"string",
"null"
],
"format": "date-time"
},
"retry_count": {
"description": "Current retry count.",
"examples": [
0
],
"type": "integer",
"format": "int32"
},
"status": {
"description": "Queue status: PENDING, CLAIMED, or RETRY_PENDING.",
"examples": [
"PENDING"
],
"type": "string"
},
"updated_at": {
"description": "Timestamp when the work order was last updated.",
"examples": [
"2023-01-01T00:00:00Z"
],
"type": "string",
"format": "date-time"
},
"work_type": {
"description": "Type of work (e.g., \"build\", \"test\", \"backup\").",
"examples": [
"build"
],
"type": "string"
},
"yaml_content": {
"description": "Multi-document YAML content (e.g., Build + WorkOrder definitions).",
"examples": [
"apiVersion: shipwright.io/v1beta1\nkind: Build\n..."
],
"type": "string"
}
}
}Fields§
§backoff_seconds: i32Base backoff seconds for exponential retry calculation.
claim_timeout_seconds: i32Seconds before a claimed work order is considered stale.
claimed_at: Option<DateTime<Utc>>Timestamp when the work order was claimed.
claimed_by: Option<Uuid>ID of the agent that claimed this work order (if any).
created_at: DateTime<Utc>Timestamp when the work order was created.
id: UuidUnique identifier for the work order.
last_error: Option<String>Most recent error message from failed execution attempt.
last_error_at: Option<DateTime<Utc>>Timestamp of the most recent failure.
max_retries: i32Maximum number of retry attempts.
next_retry_after: Option<DateTime<Utc>>Timestamp when RETRY_PENDING work order becomes PENDING again.
retry_count: i32Current retry count.
status: StringQueue status: PENDING, CLAIMED, or RETRY_PENDING.
updated_at: DateTime<Utc>Timestamp when the work order was last updated.
work_type: StringType of work (e.g., “build”, “test”, “backup”).
yaml_content: StringMulti-document YAML content (e.g., Build + WorkOrder definitions).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WorkOrder
impl<'de> Deserialize<'de> for WorkOrder
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WorkOrder
impl RefUnwindSafe for WorkOrder
impl Send for WorkOrder
impl Sync for WorkOrder
impl Unpin for WorkOrder
impl UnsafeUnpin for WorkOrder
impl UnwindSafe for WorkOrder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more