[ARVADOS] updated: 641a04fc2dd876440ed983a4cdf0e03f188040c1

git at public.curoverse.com git at public.curoverse.com
Mon Sep 29 14:04:35 EDT 2014


Summary of changes:
 apps/workbench/app/controllers/collections_controller.rb | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

       via  641a04fc2dd876440ed983a4cdf0e03f188040c1 (commit)
      from  070ca0d5fdd81ed1d3a32fbfc4d1329bb911bdf1 (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 641a04fc2dd876440ed983a4cdf0e03f188040c1
Author: Tim Pierce <twp at curoverse.com>
Date:   Mon Sep 29 14:01:00 2014 -0400

    3782: print log lines compatible with the log viewer
    
    When the log is truncated, make it parsable by the log viewer regex in
    addToLogViewer().

diff --git a/apps/workbench/app/controllers/collections_controller.rb b/apps/workbench/app/controllers/collections_controller.rb
index fb9d337..bdfa832 100644
--- a/apps/workbench/app/controllers/collections_controller.rb
+++ b/apps/workbench/app/controllers/collections_controller.rb
@@ -308,8 +308,13 @@ class CollectionsController < ApplicationController
           end
           yield buf
         end
-        if @opts.include? :size and bytesleft == 0 then
-          yield "Log truncated (exceeded #{@opts[:size]} bytes). To retrieve the full log: arv-get #{@opts[:uuid]}/#{@opts[:file]}"
+        if buf and @opts.include? :size and bytesleft == 0 then
+          unless buf[-1] == "\n"
+            yield "\n"
+          end
+          # This line should match the regex in
+          # app/assets/javascripts/log_viewer.js:addToLogViewer()
+          yield Time.now.strftime("%F_%T zzzzz-zzzzz-zzzzzzzzzzzzzzz 0  File truncated (exceeded #{@opts[:size]} bytes). To retrieve the full file: arv-get #{@opts[:uuid]}/#{@opts[:file]}\n")
         end
       end
       Rails.logger.warn("#{@opts[:uuid]}/#{@opts[:file]}: #{$?}") if $? != 0

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list