Don't postpone the import job for 5 seconds, just run it immediately

This commit is contained in:
Eugene Burmakin 2024-04-25 22:53:55 +02:00
parent 1ef2c67133
commit 23a691b014

View file

@ -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