[ARVADOS] updated: 1.2.0-19-gf739d736b
Git user
git at public.curoverse.com
Fri Aug 17 10:42:18 EDT 2018
Summary of changes:
sdk/go/dispatch/dispatch.go | 23 +++++++++++++++++++++-
.../crunch-dispatch-local_test.go | 2 +-
.../crunch-dispatch-slurm/crunch-dispatch-slurm.go | 4 ++++
.../crunch-dispatch-slurm_test.go | 2 +-
services/crunch-dispatch-slurm/usage.go | 1 +
5 files changed, 29 insertions(+), 3 deletions(-)
via f739d736bbb60a8463f04f5d56c18d09157d820e (commit)
via d7b63b6901f31b8b9de89762cdf76aa9ae5b00b7 (commit)
via 70e5c7a3c6a5860d702d5e5c219dc0f3a3696d35 (commit)
via a96cca47cc60c482316d3b1a25cfe1cb4b838f41 (commit)
via fd4d26e448b1f9f45f84c0ff9ec10db54471d880 (commit)
via 420a8e7fb7b159452da834062cc3e040dd1b411b (commit)
from 58044098495d066effa7fd4742b6635d9a10fdfb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit f739d736bbb60a8463f04f5d56c18d09157d820e
Merge: 580440984 d7b63b690
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Fri Aug 17 10:38:39 2018 -0400
13959: Merge branch 'master' into 13959-timeouts-and-logging
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --cc sdk/go/dispatch/dispatch.go
index 152207ea9,4e25ba4f0..c8fb5aeb3
--- a/sdk/go/dispatch/dispatch.go
+++ b/sdk/go/dispatch/dispatch.go
@@@ -35,8 -29,9 +35,11 @@@ type Logger interface
type Dispatcher struct {
Arv *arvadosclient.ArvadosClient
+ Logger Logger
+
+ // Batch size for container queries
+ BatchSize int64
+
// Queue polling frequency
PollPeriod time.Duration
@@@ -174,8 -166,22 +181,22 @@@ func (d *Dispatcher) start(c arvados.Co
}
func (d *Dispatcher) checkForUpdates(filters [][]interface{}, todo map[string]*runTracker) bool {
+ var countList arvados.ContainerList
params := arvadosclient.Dict{
"filters": filters,
+ "count": "exact",
+ "limit": 0,
+ "order": []string{"priority desc"}}
+ err := d.Arv.List("containers", params, &countList)
+ if err != nil {
- log.Printf("error getting count of containers: %q", err)
++ d.Logger.Warnf("error getting count of containers: %q", err)
+ return false
+ }
+ itemsAvailable := countList.ItemsAvailable
+ params = arvadosclient.Dict{
+ "filters": filters,
+ "count": "none",
+ "limit": d.BatchSize,
"order": []string{"priority desc"}}
offset := 0
for {
diff --cc services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
index b12be91c9,36ef26496..ce0360261
--- a/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
+++ b/services/crunch-dispatch-slurm/crunch-dispatch-slurm.go
@@@ -182,7 -167,7 +185,8 @@@ func (disp *Dispatcher) setup()
}
disp.Dispatcher = &dispatch.Dispatcher{
Arv: arv,
+ Logger: disp.logger,
+ BatchSize: disp.BatchSize,
RunContainer: disp.runContainer,
PollPeriod: time.Duration(disp.PollPeriod),
MinRetryPeriod: time.Duration(disp.MinRetryPeriod),
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list