[ARVADOS] updated: a798ad3d09bddd87bd1ece6ec62ec01410eae9d2
git at public.curoverse.com
git at public.curoverse.com
Thu Mar 5 13:32:21 EST 2015
Summary of changes:
services/keepstore/pull_worker.go | 16 +++++++---------
services/keepstore/pull_worker_test.go | 2 +-
2 files changed, 8 insertions(+), 10 deletions(-)
via a798ad3d09bddd87bd1ece6ec62ec01410eae9d2 (commit)
from a69c06d2d7af4c328f779fd3f213f2018675962c (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 a798ad3d09bddd87bd1ece6ec62ec01410eae9d2
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Mar 5 13:31:53 2015 -0500
3761: log errors in RunPullWorker instead of Pull method.
diff --git a/services/keepstore/pull_worker.go b/services/keepstore/pull_worker.go
index e102f5a..46b933c 100644
--- a/services/keepstore/pull_worker.go
+++ b/services/keepstore/pull_worker.go
@@ -22,7 +22,13 @@ import (
func RunPullWorker(pullq *WorkQueue, keepClient keepclient.KeepClient) {
nextItem := pullq.NextItem
for item := range nextItem {
- Pull(item.(PullRequest), keepClient)
+ pullRequest := item.(PullRequest)
+ err := Pull(item.(PullRequest), keepClient)
+ if err == nil {
+ log.Printf("Pull %s success", pullRequest)
+ } else {
+ log.Printf("Pull %s error: %s", pullRequest, err)
+ }
}
}
@@ -34,14 +40,6 @@ func RunPullWorker(pullq *WorkQueue, keepClient keepclient.KeepClient) {
Write to storage
*/
func Pull(pullRequest PullRequest, keepClient keepclient.KeepClient) (err error) {
- defer func() {
- if err == nil {
- log.Printf("Pull %s success", pullRequest)
- } else {
- log.Printf("Pull %s error: %s", pullRequest, err)
- }
- }()
-
service_roots := make(map[string]string)
for _, addr := range pullRequest.Servers {
service_roots[addr] = addr
diff --git a/services/keepstore/pull_worker_test.go b/services/keepstore/pull_worker_test.go
index 2ccb94d..43f01f7 100644
--- a/services/keepstore/pull_worker_test.go
+++ b/services/keepstore/pull_worker_test.go
@@ -19,7 +19,7 @@ var processedPullLists map[string]string
type PullWorkerTestSuite struct{}
// Gocheck boilerplate
-func Test(t *testing.T) {
+func TestPullWorker(t *testing.T) {
TestingT(t)
}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list