projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
9953: Add systemd unit file for arvados-docker-cleaner.
[arvados.git]
/
services
/
keepstore
/
pull_worker.go
diff --git
a/services/keepstore/pull_worker.go
b/services/keepstore/pull_worker.go
index 9f0b96fa35b1c32af4b06be92ea02632547ef249..d53d1060e743e07d9d2bfba6b90c67376a1006ab 100644
(file)
--- a/
services/keepstore/pull_worker.go
+++ b/
services/keepstore/pull_worker.go
@@
-2,7
+2,6
@@
package main
import (
"crypto/rand"
import (
"crypto/rand"
- "errors"
"fmt"
"git.curoverse.com/arvados.git/sdk/go/keepclient"
"io"
"fmt"
"git.curoverse.com/arvados.git/sdk/go/keepclient"
"io"
@@
-57,7
+56,7
@@
func PullItemAndProcess(pullRequest PullRequest, token string, keepClient *keepc
return
}
if reader == nil {
return
}
if reader == nil {
- return
errors.New(fmt.Sprintf("No reader found for : %s", signedLocator)
)
+ return
fmt.Errorf("No reader found for : %s", signedLocator
)
}
defer reader.Close()
}
defer reader.Close()
@@
-67,7
+66,7
@@
func PullItemAndProcess(pullRequest PullRequest, token string, keepClient *keepc
}
if (readContent == nil) || (int64(len(readContent)) != contentLen) {
}
if (readContent == nil) || (int64(len(readContent)) != contentLen) {
- return
errors.New(fmt.Sprintf("Content not found for: %s", signedLocator)
)
+ return
fmt.Errorf("Content not found for: %s", signedLocator
)
}
err = PutContent(readContent, pullRequest.Locator)
}
err = PutContent(readContent, pullRequest.Locator)
@@
-95,6
+94,6
@@
func GenerateRandomAPIToken() string {
// Put block
var PutContent = func(content []byte, locator string) (err error) {
// Put block
var PutContent = func(content []byte, locator string) (err error) {
- err = PutBlock(content, locator)
+
_,
err = PutBlock(content, locator)
return
}
return
}