2756: rescue any exceptions. do not write to redis. use log properties, instead of...
[arvados.git] / apps / workbench / app / helpers / pipeline_instances_helper.rb
index b39bfb1e4f4a852e1761cba06868d1c29d0ab7c2..56e85dbd792269362c880f85626d14a50e48c996 100644 (file)
@@ -25,13 +25,18 @@ module PipelineInstancesHelper
   def pipieline_log_history(job_uuids)
     results = []
 
-    log_history = Log.where(event_type: 'stderr', object_uuid: job_uuids).
-                      order('id DESC').limit(20).all
+    log_history = Log.where(event_type: 'stderr',
+                            object_uuid: job_uuids).order('id DESC')
     if !log_history.results.empty?
       reversed_results = log_history.results.reverse
       reversed_results.each do |entry|
-        summary = entry.summary
-        results = results.concat summary.split("\n")
+        if entry.andand.properties
+          properties = entry.properties
+          text = properties[:text]
+          if text
+            results = results.concat text.split("\n")
+          end
+        end
       end
     end