]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/trace.rb
Add unsubscribe link to changeset notification mails
[rails.git] / app / models / trace.rb
index 2411fb9b7a3c56c2f2adc57787a6194f83058c51..1e8f25a830757b64f9cfa692d6fcaa6a74fce03b 100644 (file)
@@ -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)