19075: When constructing a workflow request, set use_existing=false
[arvados.git] / apps / workbench / app / controllers / work_units_controller.rb
index 8c4e5e7d9f3f5c64ebb04e4175710c46eefab4ff..86e3cdd91da779cdb52a12afaf9ca3605007a700 100644 (file)
@@ -83,6 +83,7 @@ class WorkUnitsController < ApplicationController
       attrs['properties'] = {'template_uuid' => template_uuid}
       attrs['priority'] = 1
       attrs['state'] = "Uncommitted"
+      attrs['use_existing'] = false
 
       # required
       attrs['container_image'] = "arvados/jobs"
@@ -117,12 +118,16 @@ class WorkUnitsController < ApplicationController
               if hint[:keep_cache]
                 keep_cache = hint[:keep_cache]
               end
+              if hint[:acrContainerImage]
+                attrs['container_image'] = hint[:acrContainerImage]
+              end
             end
           end
         end
       end
 
       attrs['command'] = ["arvados-cwl-runner",
+                          "--enable-reuse",
                           "--local",
                           "--api=containers",
                           "--project-uuid=#{params['work_unit']['owner_uuid']}",