1 require 'simulate_job_log'
2 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]"'
3 task :replay_job_log, [:filename, :multiplier, :uuid] => :environment do |t, args|
5 abort("No filename specified.") if args[:filename].blank?
6 replay( args[:filename], args[:multiplier].to_f, args[:uuid] )