+ *crunchRunCommand = crunchCmd
+
+ ctx, cancel := context.WithCancel(context.Background())
+ dispatcher := dispatch.Dispatcher{
+ Arv: arv,
+ PollPeriod: time.Duration(1) * time.Second,
+ RunContainer: func(d *dispatch.Dispatcher, c arvados.Container, s <-chan arvados.Container) {
+ run(d, c, s)
+ cancel()
+ },
+ }
+
+ startCmd = func(container arvados.Container, cmd *exec.Cmd) error {
+ dispatcher.UpdateState(container.UUID, "Running")
+ dispatcher.UpdateState(container.UUID, "Complete")
+ return cmd.Start()
+ }
+