mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-22 05:40:50 +02:00
Increases stopContainer timeout to 10min (#528)
That means the update timeout until now has been 1 second, as that's the sleep duration of the timeout checker. This commit changes it to 10 actual minutes.
This commit is contained in:
parent
42d088689f
commit
45c9dcc779
1 changed files with 4 additions and 3 deletions
|
@ -3,12 +3,13 @@ package actions
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/containrrr/watchtower/pkg/filters"
|
|
||||||
"github.com/containrrr/watchtower/pkg/sorter"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/containrrr/watchtower/pkg/filters"
|
||||||
|
"github.com/containrrr/watchtower/pkg/sorter"
|
||||||
|
|
||||||
"github.com/opencontainers/runc/Godeps/_workspace/src/github.com/Sirupsen/logrus"
|
"github.com/opencontainers/runc/Godeps/_workspace/src/github.com/Sirupsen/logrus"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
@ -45,7 +46,7 @@ func cleanupExcessWatchtowers(containers []container.Container, client container
|
||||||
allContainersExceptLast := containers[0 : len(containers)-1]
|
allContainersExceptLast := containers[0 : len(containers)-1]
|
||||||
|
|
||||||
for _, c := range allContainersExceptLast {
|
for _, c := range allContainersExceptLast {
|
||||||
if err := client.StopContainer(c, 600); err != nil {
|
if err := client.StopContainer(c, 10*time.Minute); err != nil {
|
||||||
// logging the original here as we're just returning a count
|
// logging the original here as we're just returning a count
|
||||||
logrus.Error(err)
|
logrus.Error(err)
|
||||||
stopErrors++
|
stopErrors++
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue