X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1267366d66cadcc09972721bf7381f96f8fe73d6..7ebe828a435dcaa1b5668b72adbaad495059f211:/services/keepstore/pull_worker.go diff --git a/services/keepstore/pull_worker.go b/services/keepstore/pull_worker.go index 100d08838d..abe3dc3857 100644 --- a/services/keepstore/pull_worker.go +++ b/services/keepstore/pull_worker.go @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: AGPL-3.0 -package main +package keepstore import ( "context" @@ -11,7 +11,7 @@ import ( "io/ioutil" "time" - "git.curoverse.com/arvados.git/sdk/go/keepclient" + "git.arvados.org/arvados.git/sdk/go/keepclient" ) // RunPullWorker receives PullRequests from pullq, invokes @@ -80,7 +80,7 @@ func (h *handler) pullItemAndProcess(pullRequest PullRequest) error { return writePulledBlock(h.volmgr, vol, readContent, pullRequest.Locator) } -// Fetch the content for the given locator using keepclient. +// GetContent fetches the content for the given locator using keepclient. var GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) (io.ReadCloser, int64, string, error) { return keepClient.Get(signedLocator) } @@ -88,8 +88,7 @@ var GetContent = func(signedLocator string, keepClient *keepclient.KeepClient) ( var writePulledBlock = func(volmgr *RRVolumeManager, volume Volume, data []byte, locator string) error { if volume != nil { return volume.Put(context.Background(), locator, data) - } else { - _, err := PutBlock(context.Background(), volmgr, data, locator) - return err } + _, err := PutBlock(context.Background(), volmgr, data, locator, nil) + return err }