9799: Fix up live_log_lines so it works for all work units.
[arvados.git] / apps / workbench / app / models / container_work_unit.rb
index 42a4f4bd5b6110f9ad65260ba66c2b2037de8642..c8af093e8f7ebb8af41f457770be4cda9afd04e7 100644 (file)
@@ -134,13 +134,6 @@ class ContainerWorkUnit < ProxyWorkUnit
     [get_combined(:uuid), get(:uuid)].uniq
   end
 
-  def live_log_lines(limit=2000)
-    event_types = ["stdout", "stderr", "arv-mount", "crunch-run"]
-    log_lines = Log.where(event_type: event_types, object_uuid: log_object_uuids).order("id DESC").limit(limit)
-    log_lines.results.reverse.
-      flat_map { |log| log.properties[:text].split("\n") rescue [] }
-  end
-
   def render_log
     collection = Collection.find(log_collection) rescue nil
     if collection