X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c2432ae423c6744b8443c63d0e02e1ccc2d3011..e59f1b610817ad8442bc639d479cebe0a851c05a:/app/controllers/traces_controller.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 253bc4160..d06c05b20 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -127,6 +127,7 @@ class TracesController < ApplicationController flash[:notice] = t ".trace_uploaded" flash[:warning] = t ".traces_waiting", :count => current_user.traces.where(:inserted => false).count if current_user.traces.where(:inserted => false).count > 4 + TraceImporterJob.perform_later(@trace) redirect_to :action => :index, :display_name => current_user.display_name else flash[:error] = t("traces.create.upload_failed") if @trace.valid? @@ -210,6 +211,7 @@ class TracesController < ApplicationController trace.visible = false trace.save flash[:notice] = t ".scheduled_for_deletion" + TraceDestroyerJob.perform_later(trace) redirect_to :action => :index, :display_name => trace.user.display_name end rescue ActiveRecord::RecordNotFound