Skip to content

Commit

Permalink
Merge pull request #893 from hashicorp/docker-fingerprint
Browse files Browse the repository at this point in the history
Making the docker fingerprinter periodic
  • Loading branch information
diptanu committed Mar 8, 2016
2 parents f4b4034 + fa6707a commit f01a94c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/driver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/client/driver/logging"
cstructs "github.com/hashicorp/nomad/client/driver/structs"
"github.com/hashicorp/nomad/client/fingerprint"
"github.com/hashicorp/nomad/helper/discover"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/mitchellh/mapstructure"
Expand All @@ -42,7 +41,6 @@ const (

type DockerDriver struct {
DriverContext
fingerprint.StaticFingerprinter
}

type DockerDriverAuth struct {
Expand Down Expand Up @@ -415,6 +413,10 @@ func (d *DockerDriver) recoverablePullError(err error, image string) error {
return cstructs.NewRecoverableError(fmt.Errorf("Failed to pull `%s`: %s", image, err), recoverable)
}

func (d *DockerDriver) Periodic() (bool, time.Duration) {
return true, 15 * time.Second
}

func (d *DockerDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, error) {
var driverConfig DockerDriverConfig
if err := mapstructure.WeakDecode(task.Config, &driverConfig); err != nil {
Expand Down

0 comments on commit f01a94c

Please sign in to comment.