lib/tasks/geocoder.rake in geocoder-1.3.7 vs lib/tasks/geocoder.rake in geocoder-1.4.0

- old
+ new

@@ -5,10 +5,10 @@ sleep_timer = ENV['SLEEP'] || ENV['sleep'] batch = ENV['BATCH'] || ENV['batch'] reverse = ENV['REVERSE'] || ENV['reverse'] raise "Please specify a CLASS (model)" unless class_name klass = class_from_string(class_name) - batch = batch.to_i unless batch.nil? + batch = (batch.to_i unless batch.nil?) || 1000 reverse = false unless reverse.to_s.downcase == 'true' if reverse klass.not_reverse_geocoded.find_each(batch_size: batch) do |obj| obj.reverse_geocode; obj.save