This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "open a given log file, and extract/save hours from all Business Verification records logged" | |
task :reprocess_hours, [:filename] => :environment do |t, args| | |
lines_read = lines_processed = lines_skipped = lines_failed = 0 | |
filename = args[:filename] | |
puts "Reading lines from #{filename}..." | |
in_log = File.open(filename) | |
in_log.each do |line| | |
lines_read += 1 | |
json = JSON.parse(line) |