]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/3382'
authorTom Hughes <tom@compton.nu>
Thu, 25 Nov 2021 17:19:26 +0000 (17:19 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 25 Nov 2021 17:19:26 +0000 (17:19 +0000)
app/controllers/api/traces_controller.rb
app/controllers/traces_controller.rb
config/settings.yml

index 6c77f9dc4bae539cb581a60402e372f49dc80d7d..43bbeeb1d208361e6e236fb6cbab9e1486b89eb1 100644 (file)
@@ -38,7 +38,7 @@ module Api
       if trace.user == current_user
         trace.visible = false
         trace.save!
-        TraceDestroyerJob.perform_later(trace) if Settings.trace_use_job_queue
+        TraceDestroyerJob.perform_later(trace)
 
         head :ok
       else
@@ -79,7 +79,7 @@ module Api
         trace = do_create(params[:file], tags, description, visibility)
 
         if trace.id
-          TraceImporterJob.perform_later(trace) if Settings.trace_use_job_queue
+          TraceImporterJob.perform_later(trace)
           render :plain => trace.id.to_s
         elsif trace.valid?
           head :internal_server_error
index b4853c6b8f7c5c1c91367cf98c14ced1c8253d90..9ebad161396300fde5ade76fc6989d2777cda2ba 100644 (file)
@@ -110,7 +110,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) if Settings.trace_use_job_queue
+        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?
@@ -194,7 +194,7 @@ class TracesController < ApplicationController
       trace.visible = false
       trace.save
       flash[:notice] = t ".scheduled_for_deletion"
-      TraceDestroyerJob.perform_later(trace) if Settings.trace_use_job_queue
+      TraceDestroyerJob.perform_later(trace)
       redirect_to :action => :index, :display_name => trace.user.display_name
     end
   rescue ActiveRecord::RecordNotFound
index 6f77efcfd835ea3b83e00e6706225839b2ac2166..801e8f2d1328045a0629870cd385aaf4afbc526a 100644 (file)
@@ -63,10 +63,6 @@ spam_threshold: 50
 diary_feed_delay: 0
 # Default legale (jurisdiction location) for contributor terms
 default_legale: GB
-# Use the built-in jobs queue for importing traces
-# Set to false if you are using the external high-speed gpx importer
-# https://github.com/openstreetmap/gpx-import
-trace_use_job_queue: true
 # Location of GPX traces and images
 gpx_trace_dir: "/home/osm/traces"
 gpx_image_dir: "/home/osm/images"