このコミットが含まれているのは:
@@ -18,13 +18,13 @@ class CountsExportDownload
|
||||
end
|
||||
def self.verifier = Rails.application.message_verifier('counts_export_download')
|
||||
|
||||
def self.prepare(exporter, owner, progress: nil, check: nil, identifier: nil)
|
||||
def self.prepare(exporter, owner, progress: nil, phase: nil, check: nil, identifier: nil)
|
||||
FileUtils.mkdir_p(directory, mode: 0o700)
|
||||
authority = HistoryAccess.authority
|
||||
slot = acquire_slot
|
||||
|
||||
begin
|
||||
generate(exporter, owner, progress:, check:, identifier:, authority:)
|
||||
generate(exporter, owner, progress:, phase:, check:, identifier:, authority:)
|
||||
ensure
|
||||
slot.close
|
||||
end
|
||||
@@ -41,7 +41,8 @@ class CountsExportDownload
|
||||
raise Busy
|
||||
end
|
||||
|
||||
def self.generate(exporter, owner, progress: nil, check: nil, identifier: nil, authority: HistoryAccess.authority)
|
||||
def self.generate(exporter, owner, progress: nil, phase: nil, check: nil,
|
||||
identifier: nil, authority: HistoryAccess.authority)
|
||||
FileUtils.mkdir_p(directory, mode: 0o700)
|
||||
Dir.glob(directory.join('counts-*.export')).each do |path|
|
||||
File.unlink(path) if File.mtime(path) < Time.current - EXPIRY
|
||||
@@ -64,7 +65,7 @@ class CountsExportDownload
|
||||
path = file.path
|
||||
begin
|
||||
file.binmode
|
||||
exporter.body(progress:).each do |chunk|
|
||||
exporter.body(progress:, phase:).each do |chunk|
|
||||
check&.call
|
||||
raise TimedOut if Process.clock_gettime(Process::CLOCK_MONOTONIC) > deadline
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする