X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/1700c23dd1018b66a268b4c76fcf9fb2a09a35ab..65d8d12a4d3bb190c0d7d38dbf7bb566473635dc:/app/controllers/traces_controller.rb diff --git a/app/controllers/traces_controller.rb b/app/controllers/traces_controller.rb index 242f8113c..df6337147 100644 --- a/app/controllers/traces_controller.rb +++ b/app/controllers/traces_controller.rb @@ -126,7 +126,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) + @trace.schedule_import redirect_to :action => :index, :display_name => current_user.display_name else flash[:error] = t(".upload_failed") if @trace.valid? @@ -176,7 +176,7 @@ class TracesController < ApplicationController trace.visible = false trace.save flash[:notice] = t ".scheduled_for_deletion" - TraceDestroyerJob.perform_later(trace) + trace.schedule_destruction redirect_to :action => :index, :display_name => trace.user.display_name end rescue ActiveRecord::RecordNotFound