redux of the worker queue

This commit is contained in:
Connor Johnstone
2026-03-23 18:37:46 -04:00
parent 59a26c18f3
commit 36345b12ee
12 changed files with 813 additions and 516 deletions

View File

@@ -225,7 +225,10 @@ pub struct TaskRef {
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct PipelineRef {
#[serde(default)]
pub task_ids: Vec<String>,
#[serde(default)]
pub pipeline_id: Option<String>,
}
// --- Status ---
@@ -246,6 +249,10 @@ pub struct Status {
pub tasks: Vec<TaskInfo>,
#[serde(default)]
pub scheduled: Option<ScheduledTasks>,
#[serde(default)]
pub work_queue: Option<WorkQueueStats>,
#[serde(default)]
pub scheduler: Option<serde_json::Value>,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
@@ -254,6 +261,22 @@ pub struct ScheduledTasks {
pub next_monitor: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct WorkQueueCounts {
pub pending: u64,
pub running: u64,
pub completed: u64,
pub failed: u64,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct WorkQueueStats {
pub download: WorkQueueCounts,
pub index: WorkQueueCounts,
pub tag: WorkQueueCounts,
pub organize: WorkQueueCounts,
}
#[derive(Debug, Clone, PartialEq, Deserialize)]
pub struct LibrarySummary {
pub total_items: u64,