Skip to content

Commit be174aa

Browse files
committed
refactor(vmm): use embedded restart defaults
1 parent 0faadfe commit be174aa

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

dstack/vmm/src/config.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -169,32 +169,15 @@ pub struct AutoRestartConfig {
169169
/// How often the supervisor state is sampled.
170170
pub interval: u64,
171171
/// Maximum consecutive automatic restart attempts before intervention.
172-
#[serde(default = "default_auto_restart_max_retries")]
173172
pub max_retries: u32,
174173
/// Delay before the first retry. Later retries use exponential backoff.
175-
#[serde(default = "default_auto_restart_initial_backoff")]
176174
pub initial_backoff: u64,
177175
/// Upper bound for the exponential retry delay.
178-
#[serde(default = "default_auto_restart_max_backoff")]
179176
pub max_backoff: u64,
180177
/// Continuous healthy runtime required to reset the retry budget.
181-
#[serde(default = "default_auto_restart_reset_window")]
182178
pub reset_window: u64,
183179
}
184180

185-
const fn default_auto_restart_max_retries() -> u32 {
186-
5
187-
}
188-
const fn default_auto_restart_initial_backoff() -> u64 {
189-
5
190-
}
191-
const fn default_auto_restart_max_backoff() -> u64 {
192-
300
193-
}
194-
const fn default_auto_restart_reset_window() -> u64 {
195-
300
196-
}
197-
198181
impl AutoRestartConfig {
199182
pub fn validate(&self) -> Result<()> {
200183
if self.enabled {

0 commit comments

Comments
 (0)