[ARVADOS] updated: a69c06d2d7af4c328f779fd3f213f2018675962c
git at public.curoverse.com
git at public.curoverse.com
Thu Mar 5 11:57:20 EST 2015
Summary of changes:
.../pipeline_instances/_running_component.html.erb | 2 +-
.../test/integration/pipeline_instances_test.rb | 38 +++++--
sdk/python/arvados/api.py | 65 ++++++-----
sdk/python/arvados/keep.py | 16 +++
sdk/python/tests/test_api.py | 7 ++
.../controllers/arvados/v1/schema_controller.rb | 1 +
services/api/config/application.default.yml | 6 +
services/api/test/fixtures/pipeline_instances.yml | 63 ++++++++++-
services/crunchstat/crunchstat.go | 98 ++++++++--------
services/crunchstat/crunchstat_test.go | 125 ++++++++++++++-------
services/keepstore/pull_worker.go | 16 +--
services/keepstore/pull_worker_test.go | 3 +-
12 files changed, 291 insertions(+), 149 deletions(-)
via a69c06d2d7af4c328f779fd3f213f2018675962c (commit)
via 7699440ac6000480ffbcd22f5a1c2982fb056dc5 (commit)
via fcad01c98cfc6bab6af9c6d461692c28bfba6de8 (commit)
via 5fbc413ccdabc9c7551f13e5a76573d72c438251 (commit)
via 068189e8be1e83066ea3c7b79a1dfdb2dcacde54 (commit)
via 3979c83819a07b544aa4a0510bbeb58d1c92905a (commit)
via b434a3a88bffcf068b500c430d6a0db0c6923190 (commit)
via a04ea95e79c60ed2a54eaec5b5c2e235fe39ef9a (commit)
via 0b4ad564482929d3f8eaefe8324df54bb276b74b (commit)
via 78387b4fb0abf03bbc6523acec7babf1e6ef321b (commit)
via f1589a6f1c94fe066232e0474c76485369b971f2 (commit)
via 912699d40991706b279aa6f9ed51991ea9250001 (commit)
via 10a83d8c408be74e56e687464b922473f72dd68f (commit)
via 4393148aceab9ae37c3a3f0eabcbf5e16ceaf3a3 (commit)
via ba386628f3d998cf1dc28990505b1bbac6021db7 (commit)
via 4d26f92c806e36c4dcfcb4809c854d5081c86fff (commit)
via 508bcab6bd1a7ca34a929d7314f5ad5c2e48ce26 (commit)
via 46558e7be9da2099ccb12497230ad81ed1d35889 (commit)
via 9d879418786a63c1b7d90be274360b8739411009 (commit)
via 61508b804d2ab9fc36308bb74c00e5bd58e09314 (commit)
from eced957ae35db978aeb4c8602d0ea30902aaa9e4 (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 a69c06d2d7af4c328f779fd3f213f2018675962c
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Mar 5 11:37:17 2015 -0500
3761: pass keepClient to Pull method
diff --git a/services/keepstore/pull_worker.go b/services/keepstore/pull_worker.go
index db1d756..e102f5a 100644
--- a/services/keepstore/pull_worker.go
+++ b/services/keepstore/pull_worker.go
@@ -8,12 +8,9 @@ import (
"io"
"io/ioutil"
"log"
- "os"
"time"
)
-var keepClient keepclient.KeepClient
-
/*
Keepstore initiates pull worker channel goroutine.
The channel will process pull list.
@@ -22,11 +19,10 @@ var keepClient keepclient.KeepClient
Skip the rest of the servers if no errors
Repeat
*/
-func RunPullWorker(pullq *WorkQueue, kc keepclient.KeepClient) {
+func RunPullWorker(pullq *WorkQueue, keepClient keepclient.KeepClient) {
nextItem := pullq.NextItem
- keepClient = kc
for item := range nextItem {
- Pull(item.(PullRequest))
+ Pull(item.(PullRequest), keepClient)
}
}
@@ -37,7 +33,7 @@ func RunPullWorker(pullq *WorkQueue, kc keepclient.KeepClient) {
Using this token & signature, retrieve the given block.
Write to storage
*/
-func Pull(pullRequest PullRequest) (err error) {
+func Pull(pullRequest PullRequest, keepClient keepclient.KeepClient) (err error) {
defer func() {
if err == nil {
log.Printf("Pull %s success", pullRequest)
@@ -53,11 +49,10 @@ func Pull(pullRequest PullRequest) (err error) {
keepClient.SetServiceRoots(service_roots)
// Generate signature with a random token
- PermissionSecret = []byte(os.Getenv("ARVADOS_API_TOKEN"))
expires_at := time.Now().Add(60 * time.Second)
signedLocator := SignLocator(pullRequest.Locator, GenerateRandomApiToken(), expires_at)
- reader, contentLen, _, err := GetContent(pullRequest.Locator, signedLocator)
+ reader, contentLen, _, err := GetContent(signedLocator, keepClient)
if err != nil {
return
}
@@ -80,7 +75,8 @@ func Pull(pullRequest PullRequest) (err error) {
}
// Fetch the content for the given locator using keepclient.
-var GetContent = func(locator string, signedLocator string) (reader io.ReadCloser, contentLength int64, url string, err error) {
+var GetContent = func(signedLocator string, keepClient keepclient.KeepClient) (
+ reader io.ReadCloser, contentLength int64, url string, err error) {
reader, blocklen, url, err := keepClient.Get(signedLocator)
return reader, blocklen, url, err
}
diff --git a/services/keepstore/pull_worker_test.go b/services/keepstore/pull_worker_test.go
index 962f2b1..2ccb94d 100644
--- a/services/keepstore/pull_worker_test.go
+++ b/services/keepstore/pull_worker_test.go
@@ -233,7 +233,8 @@ func performTest(testData PullWorkerTestData, c *C) {
time.Sleep(25 * time.Millisecond)
// Override GetContent to mock keepclient Get functionality
- GetContent = func(locator string, signedLocator string) (reader io.ReadCloser, contentLength int64, url string, err error) {
+ GetContent = func(signedLocator string, keepClient keepclient.KeepClient) (
+ reader io.ReadCloser, contentLength int64, url string, err error) {
if strings.HasPrefix(testData.name, "TestPullWorker_pull_list_with_one_locator_with_delay") {
time.Sleep(100 * time.Millisecond)
}
commit 7699440ac6000480ffbcd22f5a1c2982fb056dc5
Merge: eced957 fcad01c
Author: Radhika Chippada <radhika at curoverse.com>
Date: Thu Mar 5 10:20:37 2015 -0500
Merge branch 'master' into 3761-pull-list-worker
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list