From 9444ad494f15210a85db8bcfff154f3c79589704 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 24 Feb 2024 17:04:37 +0000 Subject: [PATCH] Reduce priority of multiple simulataneous trace imports --- app/models/trace.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/trace.rb b/app/models/trace.rb index be5d0a631..1e8f25a83 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -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 -- 2.39.5