Merge branch 'master' into 5534-limit-log-lines
[arvados.git] / services / keepstore / keepstore.go
index b6ab8faca13970e852d6f2c59f02c9ac4bbb8e01..a363bac2553998e6356216f77472bcbf537b78d3 100644 (file)
@@ -4,6 +4,7 @@ import (
        "bytes"
        "flag"
        "fmt"
+       "git.curoverse.com/arvados.git/sdk/go/keepclient"
        "io/ioutil"
        "log"
        "net"
@@ -275,8 +276,20 @@ func main() {
        }
 
        // Initialize Pull queue and worker
+       keepClient := keepclient.KeepClient{
+               Arvados:       nil,
+               Want_replicas: 1,
+               Using_proxy:   true,
+               Client:        &http.Client{},
+       }
+
+       // Initialize the pullq and worker
        pullq = NewWorkQueue()
-       go RunPullWorker(pullq.NextItem)
+       go RunPullWorker(pullq, keepClient)
+
+       // Initialize the trashq and worker
+       trashq = NewWorkQueue()
+       go RunTrashWorker(trashq)
 
        // Shut down the server gracefully (by closing the listener)
        // if SIGTERM is received.