From: Andy Allan Date: Wed, 27 Mar 2019 10:40:50 +0000 (+0100) Subject: Use the trace jobs for creating and destroy traces via the API X-Git-Tag: live~2655^2 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/d5d397518149889ec50f3db7e5b089d7930ce511?hp=c82fdf8e0fd4e5a8f2d831592d5e1fe13e1fe558 Use the trace jobs for creating and destroy traces via the API --- diff --git a/app/controllers/api/traces_controller.rb b/app/controllers/api/traces_controller.rb index 47dd152a3..5e95892e1 100644 --- a/app/controllers/api/traces_controller.rb +++ b/app/controllers/api/traces_controller.rb @@ -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