release: v1.3.5 - merge Phase 1 (health/queue API + timeout_at self-heal) onto v1.3.4 base

- Add /api/v1/health/queue queue-health endpoint (public, like /health/detailed)
- Add timeout_at column + index (migration 20261012_add_command_timeout.sql)
- consume() stamps timeout_at; pipeline_worker self-heals timed-out commands every 5m
- Bump version 1.3.4 -> 1.3.5
This commit is contained in:
Accusys
2026-10-13 00:12:05 +08:00
parent dc6081fcaf
commit 667e279768
11 changed files with 475 additions and 5 deletions
+1
View File
@@ -61,6 +61,7 @@ impl PipelineWorker {
max_messages: 5,
timeout_ms: 5000,
auto_commit: false,
timeout_seconds: 3600,
},
).await?;
+3 -1
View File
@@ -103,7 +103,8 @@ impl CommandQueue {
SET status = 'processing',
consumer_group = $1,
consumer_id = $2,
processing_started_at = NOW()
processing_started_at = NOW(),
timeout_at = NOW() + ($5::bigint * INTERVAL '1 second')
WHERE message_id IN (
SELECT message_id
FROM command_queue
@@ -127,6 +128,7 @@ impl CommandQueue {
options.consumer_id,
queue_name,
options.max_messages as i64,
options.timeout_seconds,
)
.fetch_all(&self.db)
.await?;
+3
View File
@@ -241,10 +241,13 @@ pub struct ConsumeOptions {
pub timeout_ms: i32,
#[serde(default)]
pub auto_commit: bool,
#[serde(default = "default_timeout_seconds")]
pub timeout_seconds: i64,
}
fn default_max_messages() -> i32 { 10 }
fn default_timeout_ms() -> i32 { 5000 }
fn default_timeout_seconds() -> i64 { 3600 }
/// Billing 上下文
#[derive(Debug, Clone, Serialize, Deserialize)]