2024-05-23 14:35:31 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2024-10-03 08:04:37 -04:00
|
|
|
class Import::GoogleTakeoutJob < ApplicationJob
|
2024-05-23 14:35:31 -04:00
|
|
|
queue_as :imports
|
2025-06-09 07:39:25 -04:00
|
|
|
sidekiq_options retry: false
|
2024-05-23 14:35:31 -04:00
|
|
|
|
2025-01-21 13:14:36 -05:00
|
|
|
def perform(import_id, locations, current_index)
|
|
|
|
|
locations_batch = Oj.load(locations)
|
2024-05-23 14:35:31 -04:00
|
|
|
import = Import.find(import_id)
|
|
|
|
|
|
2025-01-21 13:42:04 -05:00
|
|
|
GoogleMaps::RecordsImporter.new(import, current_index).call(locations_batch)
|
2024-05-23 14:35:31 -04:00
|
|
|
end
|
|
|
|
|
end
|