mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Refactor Wait() to not require a timeout
We added a timeout for convenience, but most invocations don't care about it. Refactor it into WaitWithTimeout() and add a Wait() that doesn't require a timeout and uses the default. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1527 Approved by: mheon
This commit is contained in:
@ -36,8 +36,6 @@ const (
|
||||
ContainerStateStopped ContainerStatus = iota
|
||||
// ContainerStatePaused indicates that the container has been paused
|
||||
ContainerStatePaused ContainerStatus = iota
|
||||
// WaitTimeout is the wait timeout before checking for container exit
|
||||
WaitTimeout = time.Second / time.Millisecond
|
||||
)
|
||||
|
||||
// CgroupfsDefaultCgroupParent is the cgroup parent for CGroupFS in libpod
|
||||
@ -47,6 +45,10 @@ const CgroupfsDefaultCgroupParent = "/libpod_parent"
|
||||
// manager in libpod
|
||||
const SystemdDefaultCgroupParent = "machine.slice"
|
||||
|
||||
// DefaultWaitInterval is the default interval between container status checks
|
||||
// while waiting.
|
||||
const DefaultWaitInterval = 250 * time.Millisecond
|
||||
|
||||
// LinuxNS represents a Linux namespace
|
||||
type LinuxNS int
|
||||
|
||||
|
Reference in New Issue
Block a user