Job reuse bugfix: do not reuse completed jobs that have NULL output.
[arvados.git] / services / api / app / models / pipeline_instance.rb
index 43497da6f4b4e133865e0492b57e73ce918d2c77..ad96b771a4de32c0c3ab00741ccc2becfae73fb6 100644 (file)
@@ -61,6 +61,10 @@ class PipelineInstance < ArvadosModel
     t.collect { |r| r[2] }.inject(0.0) { |sum,a| sum += a } / t.size
   end
 
+  def self.queue
+    self.where('active = true')
+  end
+
   protected
   def bootstrap_components
     if pipeline_template and (!components or components.empty?)