[ARVADOS] updated: ba2a66c5a6086c667cb1cb0c0165b67b3a0e3f26

git at public.curoverse.com git at public.curoverse.com
Mon Feb 10 17:15:01 EST 2014


Summary of changes:
 apps/workbench/app/views/users/_home.html.erb   |    2 +-
 apps/workbench/app/views/users/_tables.html.erb |    3 +++
 services/api/app/models/job.rb                  |    7 +++++++
 3 files changed, 11 insertions(+), 1 deletions(-)

       via  ba2a66c5a6086c667cb1cb0c0165b67b3a0e3f26 (commit)
       via  f0690c6a0a10ba20178c26a90089ef5a83f68fb4 (commit)
       via  25ee81e0c1980924518a37156a3e741c8025d46b (commit)
      from  419a2af0b5c85c7e6ffc45b18a9fe717570c0de4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit ba2a66c5a6086c667cb1cb0c0165b67b3a0e3f26
Merge: 419a2af f0690c6
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Feb 10 14:13:49 2014 -0800

    Merge branch '2008-show-log-buffer'
    
    closes #2008


commit f0690c6a0a10ba20178c26a90089ef5a83f68fb4
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Feb 10 14:12:29 2014 -0800

    Fix dashboard auto-refresh, and show last line of log_buffer (if any)
    for jobs whose logs have not yet been written to Keep.

diff --git a/apps/workbench/app/views/users/_home.html.erb b/apps/workbench/app/views/users/_home.html.erb
index 688439b..5e8b3f8 100644
--- a/apps/workbench/app/views/users/_home.html.erb
+++ b/apps/workbench/app/views/users/_home.html.erb
@@ -27,7 +27,7 @@
       }
 <% end %>
 
-<div class="container-fluid">
+<div class="container-fluid" id="home-tables">
 
     <%= render :partial => 'tables' %>
 
diff --git a/apps/workbench/app/views/users/_tables.html.erb b/apps/workbench/app/views/users/_tables.html.erb
index b325781..8d5b84f 100644
--- a/apps/workbench/app/views/users/_tables.html.erb
+++ b/apps/workbench/app/views/users/_tables.html.erb
@@ -55,6 +55,9 @@
           <a href="<%= collection_path(j.log) %>/<%= file[1] %>?disposition=inline&size=<%= file[2] %>">Log</a>
         <% end %>
       <% end %>
+    <% elsif j.respond_to? :log_buffer and j.log_buffer %>
+      <% buf = j.log_buffer.strip.split("\n").last %>
+      <span title="<%= buf %>"><%= buf %></span>
     <% end %>
   </small>
 </td>

commit 25ee81e0c1980924518a37156a3e741c8025d46b
Author: Tom Clegg <tom at curoverse.com>
Date:   Mon Feb 10 13:47:33 2014 -0800

    Include log buffer in Job API response.

diff --git a/services/api/app/models/job.rb b/services/api/app/models/job.rb
index 17ca6cb..5ea0cd4 100644
--- a/services/api/app/models/job.rb
+++ b/services/api/app/models/job.rb
@@ -35,6 +35,7 @@ class Job < ArvadosModel
     t.add :tasks_summary
     t.add :dependencies
     t.add :log_stream_href
+    t.add :log_buffer
   end
 
   def assert_finished
@@ -166,4 +167,10 @@ class Job < ArvadosModel
     end
   end
 
+  def log_buffer
+    @@redis ||= Redis.new(:timeout => 0)
+    if @@redis.exists uuid
+      @@redis.getrange(uuid, 0 - 2**10, -1)
+    end
+  end
 end

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list