summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2019-03-04 17:21:23 -0700
committerJhon Honce <jhonce@redhat.com>2019-03-06 10:32:01 -0700
commit8a6758d5fdaba9e6ec58eeb23ee5123762c18b72 (patch)
tree4273a61b912797dc6cb4d27fb6743c5367a1dfa8 /pkg/varlinkapi
parentc6c0b54c361df623378706ca5e41faac309ab7ac (diff)
downloadpodman-8a6758d5fdaba9e6ec58eeb23ee5123762c18b72.tar.gz
podman-8a6758d5fdaba9e6ec58eeb23ee5123762c18b72.tar.bz2
podman-8a6758d5fdaba9e6ec58eeb23ee5123762c18b72.zip
Implement podman-remote wait command and container subcommand
Signed-off-by: Jhon Honce <jhonce@redhat.com>
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 27b8d15d2..9934ca0cc 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 ...