[ARVADOS] updated: e9835b9e368b23c4c2d8a0e0395456254ae1257d
git at public.curoverse.com
git at public.curoverse.com
Thu Nov 20 09:55:41 EST 2014
Summary of changes:
apps/workbench/app/controllers/jobs_controller.rb | 1 +
services/api/lib/simulate_job_log.rb | 6 +-----
services/api/lib/tasks/replay_job_log.rake | 6 +++---
3 files changed, 5 insertions(+), 8 deletions(-)
via e9835b9e368b23c4c2d8a0e0395456254ae1257d (commit)
via 80649ee8eb1138e7a44ebb750ae62c675b193000 (commit)
from 0e7cfa403cb80fc68d6c10c4c912e4d618fa085a (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 e9835b9e368b23c4c2d8a0e0395456254ae1257d
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date: Thu Nov 20 15:55:35 2014 +0100
4233: remove "delete log entries" option
- this did not work as usefully as anticipated: one actually also wants the graph to be cleared, which has to be done manually anyway. The way to do this then would be to also invent a signal to be sent to the browser by the simulator, telling it to clear the graph stuff
diff --git a/services/api/lib/simulate_job_log.rb b/services/api/lib/simulate_job_log.rb
index 4ebca08..a0ab28d 100644
--- a/services/api/lib/simulate_job_log.rb
+++ b/services/api/lib/simulate_job_log.rb
@@ -1,18 +1,14 @@
module SimulateJobLog
- # Note that deleting existing log entries only works if a simulated job uuid is also specified.
- def replay(filename, multiplier = 1, delete_log_entries = false, simulated_job_uuid = nil)
+ def replay(filename, multiplier = 1, simulated_job_uuid = nil)
raise "Environment must be development or test" unless [ 'test', 'development' ].include? ENV['RAILS_ENV']
multiplier = multiplier.to_f
multiplier = 1.0 if multiplier <= 0
- delete_log_entries = (delete_log_entries.to_s.downcase == 'true')
-
actual_start_time = Time.now
log_start_time = nil
act_as_system_user do
- Log.where("object_uuid = ?", simulated_job_uuid).delete_all if simulated_job_uuid && delete_log_entries
File.open(filename).each.with_index do |line, index|
cols = {}
cols[:timestamp], cols[:job_uuid], cols[:pid], cols[:task], cols[:event_type], cols[:message] = line.split(' ', 6)
diff --git a/services/api/lib/tasks/replay_job_log.rake b/services/api/lib/tasks/replay_job_log.rake
index cfa19cd..fad205b 100644
--- a/services/api/lib/tasks/replay_job_log.rake
+++ b/services/api/lib/tasks/replay_job_log.rake
@@ -1,7 +1,7 @@
require 'simulate_job_log'
-desc 'Simulate job logging from a file. Four arguments: log filename, time multipler (optional), delete existing log entries (optional, default is false), simulated job uuid (optional). Note that deleting existing log entries only works if a simulated job uuid is also specified. E.g. (use quotation marks if using spaces between args): rake "replay_job_log[log.txt, 2.0, true, qr1hi-8i9sb-nf3qk0xzwwz3lre]"'
-task :replay_job_log, [:filename, :multiplier, :delete_log_entries, :uuid] => :environment do |t, args|
+desc 'Simulate job logging from a file. Three arguments: log filename, time multipler (optional), simulated job uuid (optional). E.g. (use quotation marks if using spaces between args): rake "replay_job_log[log.txt, 2.0, qr1hi-8i9sb-nf3qk0xzwwz3lre]"'
+task :replay_job_log, [:filename, :multiplier, :uuid] => :environment do |t, args|
include SimulateJobLog
abort("No filename specified.") if args[:filename].blank?
- replay( args[:filename], args[:multiplier].to_f, args[:delete_log_entries], args[:uuid] )
+ replay( args[:filename], args[:multiplier].to_f, args[:uuid] )
end
commit 80649ee8eb1138e7a44ebb750ae62c675b193000
Author: Phil Hodgson <bitbucket at philhodgson.net>
Date: Thu Nov 20 15:50:48 2014 +0100
4233: missing include from last commit
diff --git a/apps/workbench/app/controllers/jobs_controller.rb b/apps/workbench/app/controllers/jobs_controller.rb
index 31bbfa9..11a4e99 100644
--- a/apps/workbench/app/controllers/jobs_controller.rb
+++ b/apps/workbench/app/controllers/jobs_controller.rb
@@ -1,4 +1,5 @@
class JobsController < ApplicationController
+ include JobsHelper
def generate_provenance(jobs)
return if params['tab_pane'] != "Provenance"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list