diff --git a/lib/tasks/ocdc.rake b/lib/tasks/ocdc.rake index db1bce6b..7f415283 100644 --- a/lib/tasks/ocdc.rake +++ b/lib/tasks/ocdc.rake @@ -25,11 +25,11 @@ namespace :ocdc do puts "Geocoding #{total} arrests..." return if total.zero? - progressbar = ProgressBar.create(total: total, format: '%a %B %p%% %c/%C') + bar = ProgressBar.new(total) arrests.find_each do |arrest_info| Importers::Ocdc::ArrestGeocoder.new(arrest_info).geocode - progressbar.increment + bar.increment! end puts "Done! #{Ocdc::ArrestGeocode.count} total geocodes in database." @@ -44,11 +44,11 @@ namespace :ocdc do puts "Geocoding #{total} pre-2023 arrests..." return if total.zero? - progressbar = ProgressBar.create(total: total, format: '%a %B %p%% %c/%C') + bar = ProgressBar.new(total) arrests.each do |arrest_info| Importers::Ocdc::ArrestGeocoder.new(arrest_info).geocode - progressbar.increment + bar.increment! end puts "Done! #{Ocdc::ArrestGeocode.count} total geocodes in database."