X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/33d292e9810faeb0a038d6a3df3881411183e28c..3734cff2bab6dd2e6527d991bf70cf9d52f026d4:/app/models/trace.rb diff --git a/app/models/trace.rb b/app/models/trace.rb index be5d0a631..818cc363b 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -202,7 +202,7 @@ class Trace < ApplicationRecord logger.info("GPX Import importing #{name} (#{id}) from #{user.email}") file.open do |file| - gpx = GPX::File.new(file.path) + gpx = GPX::File.new(file.path, :maximum_points => Settings.max_trace_size) f_lat = 0 f_lon = 0 @@ -268,7 +268,7 @@ class Trace < ApplicationRecord end def schedule_import - TraceImporterJob.perform_later(self) + TraceImporterJob.new(self).enqueue(:priority => user.traces.where(:inserted => false).count) end def schedule_destruction