mirror of
https://github.com/offen/docker-volume-backup.git
synced 2026-01-14 12:56:11 +08:00
Timer is more suitable for timeout race
This commit is contained in:
parent
542d1fa69f
commit
409496af24
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ func scaleService(cli *client.Client, serviceID string, replicas uint64) ([]stri
|
|||
|
||||
func awaitContainerCountForService(cli *client.Client, serviceID string, count int) error {
|
||||
poll := time.NewTicker(time.Second)
|
||||
timeout := time.NewTicker(5 * time.Minute)
|
||||
timeout := time.NewTimer(5 * time.Minute)
|
||||
defer timeout.Stop()
|
||||
defer poll.Stop()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue