[ARVADOS] updated: 3709b281f15a3f4a91ad71c10e15faa953195d95

Git user git at public.curoverse.com
Wed Jul 6 09:59:48 EDT 2016


Summary of changes:
 apps/workbench/app/controllers/jobs_controller.rb | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

       via  3709b281f15a3f4a91ad71c10e15faa953195d95 (commit)
      from  6a73335d650cd624d3c7096a5f2a43d754464b9b (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 3709b281f15a3f4a91ad71c10e15faa953195d95
Author: Tom Clegg <tom at curoverse.com>
Date:   Tue Jul 5 16:50:39 2016 -0400

    Respect running_job_log_records_to_fetch in JobsController#logs.
    
    Fixes flaky test
    WebsocketTest#test_test_running_job_with_too_many_previous_log_records
    (see https://ci.curoverse.com/job/arvados-api-server/3092/consoleText)
    
    No issue #

diff --git a/apps/workbench/app/controllers/jobs_controller.rb b/apps/workbench/app/controllers/jobs_controller.rb
index 3984177..f18a79d 100644
--- a/apps/workbench/app/controllers/jobs_controller.rb
+++ b/apps/workbench/app/controllers/jobs_controller.rb
@@ -61,14 +61,9 @@ class JobsController < ApplicationController
   end
 
   def logs
-    @logs = Log.select(%w(event_type object_uuid event_at properties))
-               .order('event_at DESC')
-               .filter([["event_type",  "=", "stderr"],
-                        ["object_uuid", "in", [@object.uuid]]])
-               .limit(500)
-               .results
-               .to_a
-               .map{ |e| e.serializable_hash.merge({ 'prepend' => true }) }
+    @logs = @object.
+      stderr_log_query(Rails.configuration.running_job_log_records_to_fetch).
+      map { |e| e.serializable_hash.merge({ 'prepend' => true }) }
     respond_to do |format|
       format.json { render json: @logs }
     end

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list