[ARVADOS] updated: 86a02fd0842381002c46b590d774c561dbbaf19a
git at public.curoverse.com
git at public.curoverse.com
Tue May 20 16:25:22 EDT 2014
Summary of changes:
.../app/controllers/collections_controller.rb | 87 ++++++-----------
apps/workbench/app/helpers/application_helper.rb | 12 +++
.../app/views/collections/_show_jobs.html.erb | 64 -------------
.../views/collections/_show_provenance.html.erb | 84 -----------------
.../views/collections/_show_source_data.html.erb | 44 ---------
apps/workbench/app/views/collections/show.html.erb | 105 +++++++++++++++++++++
apps/workbench/app/views/folders/show.html.erb | 60 ++++++------
.../test/functional/collections_controller_test.rb | 50 ++++++++--
services/api/app/models/arvados_model.rb | 4 +-
.../20140422011506_pipeline_instance_state.rb | 2 +
services/api/lib/has_uuid.rb | 5 +-
services/api/script/crunch-dispatch.rb | 26 +++++
services/api/test/fixtures/jobs.yml | 2 +-
services/api/test/fixtures/logs.yml | 5 +
services/api/test/unit/arvados_model_test.rb | 34 +++++++
15 files changed, 296 insertions(+), 288 deletions(-)
delete mode 100644 apps/workbench/app/views/collections/_show_jobs.html.erb
delete mode 100644 apps/workbench/app/views/collections/_show_provenance.html.erb
delete mode 100644 apps/workbench/app/views/collections/_show_source_data.html.erb
create mode 100644 apps/workbench/app/views/collections/show.html.erb
create mode 100644 services/api/test/unit/arvados_model_test.rb
via 86a02fd0842381002c46b590d774c561dbbaf19a (commit)
via aa7ec423d92b977320cc5708bd9556021d50d77a (commit)
via 2768b056f5d99952d2d2c4ba8cd1dfbb898901e3 (commit)
via c965f26c02b0f358eccf6989e49703d173206486 (commit)
via f1a04b3e3c61cc92501d18863ccf0abb162f9855 (commit)
via 6d1b822d5a168166deb44d4256bf0abcfd618c67 (commit)
via 9cdf7a2f51489403a488c3d06cf252a36b8e4198 (commit)
via c08254d5d6afcb5104cd65109d16479bf44ebb85 (commit)
via c3367d7b827035d0cfc3418bc028a67142696e13 (commit)
via 7ed1dcf8b0bfa8fc78f228a07b2318094b68abea (commit)
via 5da718633e3663073a624db78274cd69e5dfe6e0 (commit)
from 8a4b7ab667a30f883dfeb0892f9fe03defc47a8f (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 86a02fd0842381002c46b590d774c561dbbaf19a
Merge: aa7ec42 2768b05
Author: radhika <radhika at curoverse.com>
Date: Tue May 20 16:23:28 2014 -0400
Merge branch 'master' into 2756-eventbus-in-workbench
commit aa7ec423d92b977320cc5708bd9556021d50d77a
Author: radhika <radhika at curoverse.com>
Date: Tue May 20 16:21:15 2014 -0400
2756: write log info from redis into log table. this will help us read this log info via the event log websockets.
diff --git a/services/api/script/crunch-dispatch.rb b/services/api/script/crunch-dispatch.rb
index 43a527a..5cf7cac 100755
--- a/services/api/script/crunch-dispatch.rb
+++ b/services/api/script/crunch-dispatch.rb
@@ -29,6 +29,10 @@ require 'open3'
$redis ||= Redis.new
LOG_BUFFER_SIZE = 2**20
+$tmp_log_buffer = ''
+$previous_tmp_log_at = Time.now
+TMP_LOG_BUFFER_SIZE = 4096
+
class Dispatcher
include ApplicationHelper
@@ -259,6 +263,13 @@ class Dispatcher
.getrange(job_uuid, (LOG_BUFFER_SIZE >> 1), -1)
.sub(/^.*?\n/, ''))
end
+
+ if (TMP_LOG_BUFFER_SIZE < $tmp_log_buffer.size) || ($previous_tmp_log_at+1 < Time.now)
+ $tmp_log_buffer += (pub_msg + "\n")
+ write_log job_uuid
+ else
+ $tmp_log_buffer += (pub_msg + "\n")
+ end
end
end
end
@@ -306,6 +317,8 @@ class Dispatcher
# Ensure every last drop of stdout and stderr is consumed
read_pipes
+ write_log job_done.uuid # write any remaining logs
+
if j_done[:stderr_buf] and j_done[:stderr_buf] != ''
$stderr.puts j_done[:stderr_buf] + "\n"
end
@@ -400,6 +413,19 @@ class Dispatcher
true
end
end
+
+ # send message to log table. we want these records to be transient
+ def write_log job_uuid
+ if $tmp_log_buffer == ''
+ return
+ end
+ log = Log.new(object_uuid: job_uuid,
+ event_type:'transient-log-entry',
+ summary: $tmp_log_buffer)
+ log.save!
+ $tmp_log_buffer = ''
+ $previous_tmp_log_at = Time.now
+ end
end
# This is how crunch-job child procs know where the "refresh" trigger file is
commit c08254d5d6afcb5104cd65109d16479bf44ebb85
Merge: 8a4b7ab c3367d7
Author: radhika <radhika at curoverse.com>
Date: Mon May 19 16:59:21 2014 -0400
Merge branch 'master' into 2756-eventbus-in-workbench
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list