From d5d397518149889ec50f3db7e5b089d7930ce511 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 27 Mar 2019 11:40:50 +0100 Subject: [PATCH] Use the trace jobs for creating and destroy traces via the API --- app/controllers/api/traces_controller.rb | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.43.2