]> git.openstreetmap.org Git - rails.git/blob - app/jobs/trace_destroyer_job.rb
Sketch out how to use the jobs queue for trace insertion and deletion
[rails.git] / app / jobs / trace_destroyer_job.rb
1 class TraceDestroyerJob < ApplicationJob
2   queue_as :default
3
4   def perform(trace)
5     trace.destroy
6   rescue StandardError => ex
7     logger.info ex.to_s
8     ex.backtrace.each { |l| logger.info l }
9   end
10 end