summaryrefslogtreecommitdiff
path: root/makima/src/db/models.rs
diff options
context:
space:
mode:
Diffstat (limited to 'makima/src/db/models.rs')
-rw-r--r--makima/src/db/models.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/makima/src/db/models.rs b/makima/src/db/models.rs
index 291fad7..1eaaf58 100644
--- a/makima/src/db/models.rs
+++ b/makima/src/db/models.rs
@@ -441,6 +441,12 @@ pub struct Task {
#[serde(default)]
pub is_supervisor: bool,
+ // Anonymous task flag
+ /// True for ephemeral one-off tasks that don't belong to a contract.
+ /// Anonymous tasks are automatically cleaned up after a period of inactivity.
+ #[serde(default)]
+ pub is_anonymous: bool,
+
// Daemon/container info
pub daemon_id: Option<Uuid>,
pub container_id: Option<String>,
@@ -558,6 +564,9 @@ pub struct TaskSummary {
/// True for contract supervisor tasks
#[serde(default)]
pub is_supervisor: bool,
+ /// True for ephemeral anonymous tasks
+ #[serde(default)]
+ pub is_anonymous: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
@@ -580,6 +589,7 @@ impl From<Task> for TaskSummary {
subtask_count: 0, // Would need separate query
version: task.version,
is_supervisor: task.is_supervisor,
+ is_anonymous: task.is_anonymous,
created_at: task.created_at,
updated_at: task.updated_at,
}