mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
add a spinner for importers
This commit is contained in:
parent
910571c45a
commit
f8080c0138
1 changed files with 6 additions and 0 deletions
|
@ -644,6 +644,12 @@ class ImportScripts::Base
|
|||
print "\r%9d / %d (%5.1f%%) " % [current, max, ((current.to_f / max.to_f) * 100).round(1)]
|
||||
end
|
||||
|
||||
def print_spinner
|
||||
@spinner_chars ||= %w{ | / - \\ }
|
||||
@spinner_chars.push @spinner_chars.shift
|
||||
print "\b#{@spinner_chars[0]}"
|
||||
end
|
||||
|
||||
def batches(batch_size)
|
||||
offset = 0
|
||||
loop do
|
||||
|
|
Loading…
Reference in a new issue