X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/06c9ea02435fb56e8c32a31694a414ca161dc2ce..9833a2b9be1a722bd9aad08baf48ca072bde7ca7:/services/keep-balance/collection.go diff --git a/services/keep-balance/collection.go b/services/keep-balance/collection.go index 73d129e9cd..1659918caf 100644 --- a/services/keep-balance/collection.go +++ b/services/keep-balance/collection.go @@ -5,10 +5,11 @@ package main import ( + "context" "fmt" "time" - "git.curoverse.com/arvados.git/sdk/go/arvados" + "git.arvados.org/arvados.git/sdk/go/arvados" ) func countCollections(c *arvados.Client, params arvados.ResourceListParams) (int, error) { @@ -30,7 +31,7 @@ func countCollections(c *arvados.Client, params arvados.ResourceListParams) (int // // If pageSize > 0 it is used as the maximum page size in each API // call; otherwise the maximum allowed page size is requested. -func EachCollection(c *arvados.Client, pageSize int, f func(arvados.Collection) error, progress func(done, total int)) error { +func EachCollection(ctx context.Context, c *arvados.Client, pageSize int, f func(arvados.Collection) error, progress func(done, total int)) error { if progress == nil { progress = func(_, _ int) {} } @@ -75,7 +76,7 @@ func EachCollection(c *arvados.Client, pageSize int, f func(arvados.Collection) for { progress(callCount, expectCount) var page arvados.CollectionList - err := c.RequestAndDecode(&page, "GET", "arvados/v1/collections", nil, params) + err := c.RequestAndDecodeContext(ctx, &page, "GET", "arvados/v1/collections", nil, params) if err != nil { return err }