dawarich/app/jobs/points/nightly_reverse_geocoding_job.rb

14 lines
319 B
Ruby
Raw Normal View History

2025-09-18 12:29:46 -04:00
# frozen_string_literal: true
class Points::NightlyReverseGeocodingJob < ApplicationJob
queue_as :reverse_geocoding
def perform
return unless DawarichSettings.reverse_geocoding_enabled?
Point.not_reverse_geocoded.find_each(batch_size: 1000) do |point|
point.async_reverse_geocode
end
end
end