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
|
2024-06-07 13:22:39 -04:00
|
|
|
sidekiq_options retry: false
|
2024-05-23 14:35:31 -04:00
|
|
|
|
2025-01-21 04:07:54 -05:00
|
|
|
def perform(import_id, json_array)
|
2024-05-23 14:35:31 -04:00
|
|
|
import = Import.find(import_id)
|
2025-01-21 04:07:54 -05:00
|
|
|
records = Oj.load(json_array)
|
2024-05-23 14:35:31 -04:00
|
|
|
|
2025-01-21 04:07:54 -05:00
|
|
|
GoogleMaps::RecordsParser.new(import).call(records)
|
2024-05-23 14:35:31 -04:00
|
|
|
end
|
|
|
|
|
end
|