Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Count records in SQL, avoids loading all the records into memory

  • Loading branch information...
commit be2d83431010261080ce816be4f0a5e17fda7f9f 1 parent 9412ef0
@alan authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/tire/tasks.rb
View
2  lib/tire/tasks.rb
@@ -60,7 +60,7 @@ def elapsed_to_human(elapsed)
STDOUT.sync = true
puts "[IMPORT] Starting import for the '#{ENV['CLASS']}' class"
tty_cols = 80
- total = klass.all.count rescue nil
+ total = klass.count rescue nil
offset = (total.to_s.size*2)+8
done = 0
Please sign in to comment.
Something went wrong with that request. Please try again.