MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / container_state_needs_resume

Function container_state_needs_resume

crates/openshell-driver-docker/src/lib.rs:2893–2898  ·  view source on GitHub ↗

States from which a managed container can be brought back to running by `start_container`. Skip `Restarting` (already coming up), `Removing`, `Dead` (terminal), `Paused` (needs `unpause`, not `start`), and `Running` (nothing to do).

(state: ContainerSummaryStateEnum)

Source from the content-addressed store, hash-verified

2891/// `Dead` (terminal), `Paused` (needs `unpause`, not `start`), and
2892/// `Running` (nothing to do).
2893fn container_state_needs_resume(state: ContainerSummaryStateEnum) -> bool {
2894 matches!(
2895 state,
2896 ContainerSummaryStateEnum::EXITED | ContainerSummaryStateEnum::CREATED
2897 )
2898}
2899
2900fn docker_stop_timeout_secs(timeout_secs: u32) -> i32 {
2901 i32::try_from(timeout_secs).unwrap_or(i32::MAX)

Callers 1

resume_sandboxMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected