このコミットが含まれているのは:
@@ -48,17 +48,19 @@ class CountsExporter
|
||||
end
|
||||
end
|
||||
|
||||
def body(progress: nil)
|
||||
return @table_export.body(progress:) if @table_export
|
||||
def body(progress: nil, phase: nil)
|
||||
return @table_export.body(progress:, phase:) if @table_export
|
||||
|
||||
Enumerator.new do |output|
|
||||
ApplicationRecord.transaction(isolation: :repeatable_read) do
|
||||
processed = 0
|
||||
first_row = true
|
||||
started = false
|
||||
phase&.call('aggregating')
|
||||
pages do |page|
|
||||
total = @mode == 'details' ? page[:count] : nil
|
||||
progress&.call(processed, total)
|
||||
phase&.call('writing')
|
||||
unless started
|
||||
meta = { resource:, mode: @mode, basis: @history ? 'history' : 'state',
|
||||
at: @query_params['at'], boundary: 'inclusive',
|
||||
@@ -90,6 +92,7 @@ class CountsExporter
|
||||
processed += 1
|
||||
progress&.call(processed, total)
|
||||
end
|
||||
phase&.call('aggregating')
|
||||
end
|
||||
progress&.call(processed, processed)
|
||||
output << ']}' if format == 'json'
|
||||
@@ -135,7 +138,8 @@ class CountsExporter
|
||||
{ count: total,
|
||||
versions: CountsVersionRepr.many(query.details, resource:,
|
||||
language_code: @language,
|
||||
at: Time.iso8601(@query_params['at'])) }
|
||||
at: Time.iso8601(@query_params['at']),
|
||||
history_flg: true) }
|
||||
end
|
||||
total ||= result[:group_count]
|
||||
yield result
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする