このコミットが含まれているのは:
@@ -47,14 +47,17 @@ class CountsExporter
|
||||
end
|
||||
end
|
||||
|
||||
def body
|
||||
return @table_export.body if @table_export
|
||||
def body(progress: nil)
|
||||
return @table_export.body(progress:) if @table_export
|
||||
|
||||
Enumerator.new do |output|
|
||||
ApplicationRecord.transaction(isolation: :repeatable_read) do
|
||||
processed = 0
|
||||
first_row = true
|
||||
started = false
|
||||
pages do |page|
|
||||
total = @mode == 'details' ? page[:count] : nil
|
||||
progress&.call(processed, total)
|
||||
unless started
|
||||
meta = { resource:, mode: @mode, basis: @history ? 'history' : 'state',
|
||||
at: @query_params['at'], boundary: 'inclusive',
|
||||
@@ -83,8 +86,11 @@ class CountsExporter
|
||||
output << CSV.generate_line(values, row_sep: "\r\n")
|
||||
end
|
||||
first_row = false
|
||||
processed += 1
|
||||
progress&.call(processed, total)
|
||||
end
|
||||
end
|
||||
progress&.call(processed, processed)
|
||||
output << ']}' if format == 'json'
|
||||
end
|
||||
end
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする