Skip to main content

walrus_daemon/hook/task/
config.rs

1//! Task executor pool configuration.
2
3use serde::{Deserialize, Serialize};
4
5/// Task executor pool configuration.
6#[derive(Debug, Clone, Serialize, Deserialize)]
7#[serde(default)]
8pub struct TasksConfig {
9    /// Maximum number of concurrently InProgress tasks (default 4).
10    pub max_concurrent: usize,
11    /// Maximum number of tasks returned by queries (default 16).
12    pub viewable_window: usize,
13    /// Per-task execution timeout in seconds (default 300).
14    pub task_timeout: u64,
15}
16
17impl Default for TasksConfig {
18    fn default() -> Self {
19        Self {
20            max_concurrent: 4,
21            viewable_window: 16,
22            task_timeout: 300,
23        }
24    }
25}