mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
18 lines
383 B
Ruby
18 lines
383 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Overland::BatchCreatingJob < ApplicationJob
|
|
include PointValidation
|
|
|
|
queue_as :default
|
|
|
|
def perform(params, user_id)
|
|
data = Overland::Params.new(params).call
|
|
|
|
data.each do |location|
|
|
next if location[:lonlat].nil?
|
|
next if point_exists?(location, user_id)
|
|
|
|
Point.create!(location.merge(user_id:))
|
|
end
|
|
end
|
|
end
|