10700: Rename PollInterval to PollPeriod in library to match commands and config...
authorTom Clegg <tom@curoverse.com>
Thu, 26 Jan 2017 19:40:30 +0000 (14:40 -0500)
committerTom Clegg <tom@curoverse.com>
Thu, 26 Jan 2017 19:40:30 +0000 (14:40 -0500)
sdk/go/dispatch/dispatch.go
services/crunch-dispatch-local/crunch-dispatch-local.go
services/crunch-dispatch-local/crunch-dispatch-local_test.go
services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
services/crunch-dispatch-slurm/crunch-dispatch-slurm_test.go

index 171ce60d38b16b2a9497b03ced5d1b78381642e3..ce960c0772eebe9f28fb314a9248b1f1490d8496 100644 (file)
@@ -39,7 +39,7 @@ type Dispatcher struct {
        RunContainer func(*Dispatcher, arvados.Container, chan arvados.Container)
 
        // Amount of time to wait between polling for updates.
-       PollInterval time.Duration
+       PollPeriod time.Duration
 
        // Minimum time between two attempts to run the same container
        MinRetryPeriod time.Duration
@@ -115,7 +115,7 @@ func (dispatcher *Dispatcher) getContainers(params arvadosclient.Dict, touched m
 }
 
 func (dispatcher *Dispatcher) pollContainers(stop chan struct{}) {
-       ticker := time.NewTicker(dispatcher.PollInterval)
+       ticker := time.NewTicker(dispatcher.PollPeriod)
        defer ticker.Stop()
 
        paramsQ := arvadosclient.Dict{
index cfb0c7da947186d74b1a3526eb9a3b08d9d58bf5..bb3c05c7eb88b9abed4ff8278ff3fbdfcf367be8 100644 (file)
@@ -58,7 +58,7 @@ func doMain() error {
        dispatcher := dispatch.Dispatcher{
                Arv:          arv,
                RunContainer: run,
-               PollInterval: time.Duration(*pollInterval) * time.Second,
+               PollPeriod:   time.Duration(*pollInterval) * time.Second,
        }
 
        err = dispatcher.Run()
index 04547308d528cbc9a2f1c3c448f062ded015e1ee..ed13a4109c4dc829581d0fb36d935de972f7a46e 100644 (file)
@@ -63,8 +63,8 @@ func (s *TestSuite) TestIntegration(c *C) {
        crunchRunCommand = &echo
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Second,
+               Arv:        arv,
+               PollPeriod: time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {
@@ -166,8 +166,8 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon
        *crunchRunCommand = crunchCmd
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Duration(1) * time.Second,
+               Arv:        arv,
+               PollPeriod: time.Duration(1) * time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {
index 8cf2c00e9e5638ae6b6580cfc01847b6414d9829..86ae79a30375365ac9d30af6dc0d649ceb54120f 100644 (file)
@@ -104,7 +104,7 @@ func doMain() error {
        dispatcher := dispatch.Dispatcher{
                Arv:            arv,
                RunContainer:   run,
-               PollInterval:   time.Duration(theConfig.PollPeriod),
+               PollPeriod:     time.Duration(theConfig.PollPeriod),
                MinRetryPeriod: time.Duration(theConfig.MinRetryPeriod),
        }
 
index 86844dc61c09545561b10c4df27f42df03149016..de25fc3d01c2b322d47aac991e47e7458828d373 100644 (file)
@@ -147,8 +147,8 @@ func (s *TestSuite) integrationTest(c *C,
        theConfig.CrunchRunCommand = []string{"echo"}
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Duration(1) * time.Second,
+               Arv:        arv,
+               PollPeriod: time.Duration(1) * time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {
@@ -208,8 +208,8 @@ func testWithServerStub(c *C, apiStubResponses map[string]arvadostest.StubRespon
        theConfig.CrunchRunCommand = []string{crunchCmd}
 
        dispatcher := dispatch.Dispatcher{
-               Arv:          arv,
-               PollInterval: time.Duration(1) * time.Second,
+               Arv:        arv,
+               PollPeriod: time.Duration(1) * time.Second,
                RunContainer: func(dispatcher *dispatch.Dispatcher,
                        container arvados.Container,
                        status chan arvados.Container) {