Exclude image preparation from client startup deadline
This commit is contained in:
parent
8334fd379f
commit
55eed08db7
1 changed files with 106 additions and 22 deletions
|
|
@ -4,8 +4,8 @@ use std::path::PathBuf;
|
|||
use clap::{Args, Parser, Subcommand};
|
||||
use lazaret_core::records::StateResetScopeV1;
|
||||
|
||||
use crate::ClientCommand;
|
||||
use crate::state::{StateCommand, StateOperation};
|
||||
use crate::{ClientCommand, DEFAULT_STARTUP_TIMEOUT};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(
|
||||
|
|
@ -36,6 +36,14 @@ enum PublicCommand {
|
|||
struct RunArguments {
|
||||
#[command(flatten)]
|
||||
domain: DomainArguments,
|
||||
/// Maximum time to wait for Domain publication, in seconds.
|
||||
#[arg(
|
||||
long,
|
||||
value_name = "SECONDS",
|
||||
default_value_t = DEFAULT_STARTUP_TIMEOUT.as_secs(),
|
||||
value_parser = clap::value_parser!(u64).range(1..)
|
||||
)]
|
||||
startup_timeout_seconds: u64,
|
||||
/// Command and arguments to run instead of the default `/bin/bash`.
|
||||
#[arg(last = true, num_args = 1.., value_name = "COMMAND")]
|
||||
command: Vec<OsString>,
|
||||
|
|
@ -121,6 +129,7 @@ pub fn parse(
|
|||
profile: arguments.domain.profile,
|
||||
workspace: arguments.domain.workspace.unwrap_or(current_workspace),
|
||||
configuration: arguments.domain.config,
|
||||
startup_timeout: std::time::Duration::from_secs(arguments.startup_timeout_seconds),
|
||||
argv: command_argv(arguments.command),
|
||||
}),
|
||||
PublicCommand::State { operation } => {
|
||||
|
|
@ -195,6 +204,7 @@ fn state_command(operation: StateArguments, current_workspace: PathBuf) -> State
|
|||
profile: domain.profile,
|
||||
workspace: domain.workspace.unwrap_or(current_workspace),
|
||||
configuration: domain.config,
|
||||
startup_timeout: DEFAULT_STARTUP_TIMEOUT,
|
||||
argv: Vec::new(),
|
||||
},
|
||||
machine,
|
||||
|
|
|
|||
Loading…
Reference in a new issue