Reduce priority of multiple simulataneous trace imports

This commit is contained in:
Tom Hughes 2024-02-24 17:04:37 +00:00
parent 33d292e981
commit 9444ad494f

View file

@ -268,7 +268,7 @@ class Trace < ApplicationRecord
end
def schedule_import
TraceImporterJob.perform_later(self)
TraceImporterJob.new(self).enqueue(:priority => user.traces.where(:inserted => false).count)
end
def schedule_destruction