aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-06 13:07:52 -0800
committerGitHub <noreply@github.com>2019-03-06 13:07:52 -0800
commit614409f64464db8022e9dc3bb0b84816ad287781 (patch)
treedf258e444b7ed91a6817e679c3af00c93afb2a2e /pkg/varlinkapi
parent02e2342d20a01c89236b4c2f2867e6acd8eda923 (diff)
parent8a6758d5fdaba9e6ec58eeb23ee5123762c18b72 (diff)
downloadpodman-614409f64464db8022e9dc3bb0b84816ad287781.tar.gz
podman-614409f64464db8022e9dc3bb0b84816ad287781.tar.bz2
podman-614409f64464db8022e9dc3bb0b84816ad287781.zip
Merge pull request #2534 from jwhonce/wip/remote_wait
Implement podman-remote wait command and container subcommand
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/containers.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 61da19c83..fe38a7cdc 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -360,17 +360,16 @@ func (i *LibpodAPI) UnpauseContainer(call iopodman.VarlinkCall, name string) err
}
// WaitContainer ...
-func (i *LibpodAPI) WaitContainer(call iopodman.VarlinkCall, name string) error {
+func (i *LibpodAPI) WaitContainer(call iopodman.VarlinkCall, name string, interval int64) error {
ctr, err := i.Runtime.LookupContainer(name)
if err != nil {
return call.ReplyContainerNotFound(name, err.Error())
}
- exitCode, err := ctr.Wait()
+ exitCode, err := ctr.WaitWithInterval(time.Duration(interval))
if err != nil {
return call.ReplyErrorOccurred(err.Error())
}
return call.ReplyWaitContainer(int64(exitCode))
-
}
// RemoveContainer ...