X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e5d3458808720f0b2ad25ba2b2be6a867b9d836e..be2e29a903a53d7565f1a52d0bebe5e5e337a1cd:/services/api/lib/tasks/replay_job_log.rake diff --git a/services/api/lib/tasks/replay_job_log.rake b/services/api/lib/tasks/replay_job_log.rake index cfa19cdce1..9c0f005275 100644 --- a/services/api/lib/tasks/replay_job_log.rake +++ b/services/api/lib/tasks/replay_job_log.rake @@ -1,7 +1,11 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + 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| - include SimulateJobLog - abort("No filename specified.") if args[:filename].blank? - replay( args[:filename], args[:multiplier].to_f, args[:delete_log_entries], args[:uuid] ) +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[:uuid] ) end