From 23a691b01434188740675e278096f849a6c88bf1 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Thu, 25 Apr 2024 22:53:55 +0200 Subject: [PATCH] Don't postpone the import job for 5 seconds, just run it immediately --- app/controllers/imports_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/imports_controller.rb b/app/controllers/imports_controller.rb index 47c73a54..f31f50f1 100644 --- a/app/controllers/imports_controller.rb +++ b/app/controllers/imports_controller.rb @@ -26,9 +26,7 @@ class ImportsController < ApplicationController import.id end - import_ids.each do |import_id| - ImportJob.set(wait: 5.seconds).perform_later(current_user.id, import_id) - end + import_ids.each { ImportJob.perform_later(current_user.id, _1) } redirect_to imports_url, notice: "#{files.size} files are queued to be imported in background", status: :see_other rescue StandardError => e