]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/2189'
authorTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 12:07:11 +0000 (12:07 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 12:07:11 +0000 (12:07 +0000)
app/controllers/api/traces_controller.rb

index 47dd152a3fa6bc53bb38e8929865789fc37074a4..5e95892e1b01924c30d219a421b0c7677a9452a0 100644 (file)
@@ -44,6 +44,7 @@ module Api
       if trace.user == current_user
         trace.visible = false
         trace.save!
+        TraceDestroyerJob.perform_later(trace) if Settings.trace_use_job_queue
 
         head :ok
       else
@@ -84,6 +85,7 @@ module Api
         trace = do_create(params[:file], tags, description, visibility)
 
         if trace.id
+          TraceImporterJob.perform_later(@trace) if Settings.trace_use_job_queue
           render :plain => trace.id.to_s
         elsif trace.valid?
           head :internal_server_error