Rename: NixFailure -> ChildFailure, NixKilled -> ChildKilled
This commit is contained in:
parent
9c179b0db8
commit
108c135700
2 changed files with 7 additions and 7 deletions
12
src/error.rs
12
src/error.rs
|
@ -19,11 +19,11 @@ pub enum ColmenaError {
|
||||||
#[snafu(display("Nix returned invalid response: {}", output))]
|
#[snafu(display("Nix returned invalid response: {}", output))]
|
||||||
BadOutput { output: String },
|
BadOutput { output: String },
|
||||||
|
|
||||||
#[snafu(display("Nix exited with error code: {}", exit_code))]
|
#[snafu(display("Child process exited with error code: {}", exit_code))]
|
||||||
NixFailure { exit_code: i32 },
|
ChildFailure { exit_code: i32 },
|
||||||
|
|
||||||
#[snafu(display("Nix was killed by signal {}", signal))]
|
#[snafu(display("Child process was killed by signal {}", signal))]
|
||||||
NixKilled { signal: i32 },
|
ChildKilled { signal: i32 },
|
||||||
|
|
||||||
#[snafu(display("This operation is not supported"))]
|
#[snafu(display("This operation is not supported"))]
|
||||||
Unsupported,
|
Unsupported,
|
||||||
|
@ -89,8 +89,8 @@ impl From<ValidationErrors> for ColmenaError {
|
||||||
impl From<ExitStatus> for ColmenaError {
|
impl From<ExitStatus> for ColmenaError {
|
||||||
fn from(status: ExitStatus) -> Self {
|
fn from(status: ExitStatus) -> Self {
|
||||||
match status.code() {
|
match status.code() {
|
||||||
Some(exit_code) => Self::NixFailure { exit_code },
|
Some(exit_code) => Self::ChildFailure { exit_code },
|
||||||
None => Self::NixKilled { signal: status.signal().unwrap() },
|
None => Self::ChildKilled { signal: status.signal().unwrap() },
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ impl ParallelismLimit {
|
||||||
/// evaluated at the same time. This can be a problem if you
|
/// evaluated at the same time. This can be a problem if you
|
||||||
/// are deploying to a large number of nodes at the same time,
|
/// are deploying to a large number of nodes at the same time,
|
||||||
/// where `nix-instantiate` may consume too much RAM and get
|
/// where `nix-instantiate` may consume too much RAM and get
|
||||||
/// killed by the OS (`NixKilled` error).
|
/// killed by the OS (`ChildKilled` error).
|
||||||
///
|
///
|
||||||
/// Evaluating each node on its own is not an efficient solution,
|
/// Evaluating each node on its own is not an efficient solution,
|
||||||
/// with total CPU time and memory consumption vastly exceeding the
|
/// with total CPU time and memory consumption vastly exceeding the
|
||||||
|
|
Loading…
Reference in a new issue