+3
-1
app/import_worker.rb
+3
-1
app/import_worker.rb
···
51
loop do
52
@user_threads.delete_if { |t| !t.alive? }
53
54
+
users = User.with_unfinished_import.where.not(id: @user_threads.map(&:user_id)).to_a
55
+
56
+
users.each do |user|
57
collections = user.imports.unfinished.map(&:collection)
58
thread = UserThread.new(user, collections, @verbose)
59
@user_threads << thread