X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/741ed5883816460a6498174cea46f43951a438cc..df4349a0505fd0acc6dab814efba9113af24dba5:/app/models/trace.rb diff --git a/app/models/trace.rb b/app/models/trace.rb index 3ab25ce30..818cc363b 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -267,6 +267,14 @@ class Trace < ApplicationRecord end end + def schedule_import + TraceImporterJob.new(self).enqueue(:priority => user.traces.where(:inserted => false).count) + end + + def schedule_destruction + TraceDestroyerJob.perform_later(self) + end + private def content_type(file)