mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
13 lines
319 B
Ruby
13 lines
319 B
Ruby
# 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
|