Merge branch '14916-rubysdk-upgrade-note'
[arvados.git] / lib / dispatchcloud / cmd.go
index a5a11d2fa33d378521d75c139672282f7bc128b3..7231e839475639c2aa5e6c720091c15b4d4b5ed7 100644 (file)
@@ -5,6 +5,8 @@
 package dispatchcloud
 
 import (
+       "context"
+
        "git.curoverse.com/arvados.git/lib/cmd"
        "git.curoverse.com/arvados.git/lib/service"
        "git.curoverse.com/arvados.git/sdk/go/arvados"
@@ -12,6 +14,8 @@ import (
 
 var Command cmd.Handler = service.Command(arvados.ServiceNameDispatchCloud, newHandler)
 
-func newHandler(cluster *arvados.Cluster, _ *arvados.NodeProfile) service.Handler {
-       return &dispatcher{Cluster: cluster}
+func newHandler(ctx context.Context, cluster *arvados.Cluster, _ *arvados.NodeProfile) service.Handler {
+       d := &dispatcher{Cluster: cluster, Context: ctx}
+       go d.Start()
+       return d
 }